Enhance bot functionality with AutoMod, Logging, Welcome, and Verification features
- Implemented AutoMod capabilities including spam filtering, anti-raid, and anti-nuke actions. - Added Logging module to track moderation actions and events across the bot. - Introduced Welcome module for customizable welcome messages and autoroles. - Developed Verification system with captcha and role assignment features. - Updated Prisma schema to include new models for AutoMod, Logging, Welcome, and Verification. - Enhanced command localization for new features in both German and English. - Improved health server to handle captcha verification requests. - Added new environment variable for public base URL to support captcha links.
This commit is contained in:
53
apps/bot/src/modules/verification/command-definitions.ts
Normal file
53
apps/bot/src/modules/verification/command-definitions.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { ChannelType } from 'discord.js';
|
||||
import { applyCommandDescription, applyOptionDescription } from '@nexumi/shared';
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export const verifyCommandData = applyCommandDescription(
|
||||
new SlashCommandBuilder()
|
||||
.setName('verify')
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('setup'), 'verify.setup.description')
|
||||
.addChannelOption((o) =>
|
||||
applyOptionDescription(
|
||||
o.setName('channel').addChannelTypes(ChannelType.GuildText).setRequired(true),
|
||||
'verify.setup.options.channel'
|
||||
)
|
||||
)
|
||||
.addRoleOption((o) =>
|
||||
applyOptionDescription(o.setName('verified_role').setRequired(true), 'verify.setup.options.verified_role')
|
||||
)
|
||||
.addRoleOption((o) =>
|
||||
applyOptionDescription(o.setName('unverified_role'), 'verify.setup.options.unverified_role')
|
||||
)
|
||||
.addStringOption((o) =>
|
||||
applyOptionDescription(o.setName('mode'), 'verify.setup.options.mode')
|
||||
.addChoices(
|
||||
{ name: 'Button', value: 'BUTTON' },
|
||||
{ name: 'Captcha', value: 'CAPTCHA' }
|
||||
)
|
||||
)
|
||||
.addIntegerOption((o) =>
|
||||
applyOptionDescription(o.setName('min_account_age_days'), 'verify.setup.options.min_account_age_days')
|
||||
.setMinValue(0)
|
||||
.setMaxValue(365)
|
||||
)
|
||||
.addStringOption((o) =>
|
||||
applyOptionDescription(o.setName('fail_action'), 'verify.setup.options.fail_action')
|
||||
.addChoices(
|
||||
{ name: 'Kick', value: 'KICK' },
|
||||
{ name: 'Ban', value: 'BAN' },
|
||||
{ name: 'None', value: 'NONE' }
|
||||
)
|
||||
)
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('panel'), 'verify.panel.description')
|
||||
.addChannelOption((o) =>
|
||||
applyOptionDescription(
|
||||
o.setName('channel').addChannelTypes(ChannelType.GuildText),
|
||||
'verify.panel.options.channel'
|
||||
)
|
||||
)
|
||||
),
|
||||
'verify.description'
|
||||
);
|
||||
Reference in New Issue
Block a user