Enhance verification system with multi-provider support and alt-account detection
- Added support for multiple captcha providers including Google reCAPTCHA (v2 and v3), hCaptcha, and Cloudflare Turnstile. - Introduced new fields in the verification configuration for selecting captcha providers and enabling alt-account detection. - Implemented logic to handle verification attempts and flag potential alt accounts based on IP and invite code analysis. - Updated environment configuration to include necessary keys for captcha providers. - Enhanced the user interface to allow selection of captcha providers in the verification setup. - Improved backend handling of verification records to store additional data related to captcha provider usage.
This commit is contained in:
@@ -50,11 +50,20 @@ const verifyCommand: SlashCommand = {
|
||||
const verifiedRole = interaction.options.getRole('verified_role', true);
|
||||
const unverifiedRole = interaction.options.getRole('unverified_role');
|
||||
const mode = (interaction.options.getString('mode') ?? 'BUTTON') as 'BUTTON' | 'CAPTCHA';
|
||||
const captchaProvider = (interaction.options.getString('captcha_provider') ??
|
||||
'MATH') as
|
||||
| 'MATH'
|
||||
| 'RECAPTCHA_V2'
|
||||
| 'RECAPTCHA_V3'
|
||||
| 'HCAPTCHA'
|
||||
| 'TURNSTILE';
|
||||
const minAccountAgeDays = interaction.options.getInteger('min_account_age_days') ?? 0;
|
||||
const failAction = (interaction.options.getString('fail_action') ?? 'KICK') as
|
||||
| 'KICK'
|
||||
| 'BAN'
|
||||
| 'NONE';
|
||||
const altDetectionEnabled =
|
||||
interaction.options.getBoolean('alt_detection') ?? false;
|
||||
|
||||
await updateVerificationConfig(context.prisma, guildId, {
|
||||
enabled: true,
|
||||
@@ -62,8 +71,10 @@ const verifyCommand: SlashCommand = {
|
||||
verifiedRoleId: verifiedRole.id,
|
||||
unverifiedRoleId: unverifiedRole?.id ?? null,
|
||||
mode,
|
||||
captchaProvider,
|
||||
minAccountAgeDays,
|
||||
failAction
|
||||
failAction,
|
||||
altDetectionEnabled
|
||||
});
|
||||
|
||||
await interaction.reply({ content: t(locale, 'verification.setupDone'), ...ephemeral() });
|
||||
|
||||
Reference in New Issue
Block a user