From bcf8fb87f4bbf4db9661cd3a508996b601e33721 Mon Sep 17 00:00:00 2001 From: en3sis <940170+en3sis@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:02:35 +0100 Subject: [PATCH] fix: adds missing command to /plugins verify --- src/commands/plugins.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/commands/plugins.ts b/src/commands/plugins.ts index 422d15c..2a79525 100644 --- a/src/commands/plugins.ts +++ b/src/commands/plugins.ts @@ -7,6 +7,7 @@ import { toggleGuildPlugin, } from '../controllers/bot/plugins.controller' import { guildActivitySetChannel } from '../controllers/plugins/guild-activity.controller' +import { verifyGuildPluginSettings } from '../controllers/plugins/verify.controller' import { logger } from '../utils/debugging' const list = pluginsListNames() @@ -58,15 +59,15 @@ module.exports = { ), ) .addSubcommand((command) => - command.setName('verify').setDescription('Enables the verification system for the server'), - ) - .addSubcommand((command) => - command.addRoleOption((option) => - option - .setName('role') - .setDescription('The role to be given to the verified user') - .setRequired(true), - ), + command + .setName('verify') + .setDescription('Enables the verification system for the server') + .addRoleOption((option) => + option + .setName('role') + .setDescription('The role to be given to the verified user') + .setRequired(true), + ), ) .addSubcommand((command) => command @@ -144,6 +145,8 @@ module.exports = { enabled: (interaction.options.getBoolean('toggle') as boolean) ?? true, }, }) + } else if (interaction.options.getSubcommand() === 'verify') { + await verifyGuildPluginSettings(interaction) } } catch (error) { logger('❌ Command: plugins: ', error)