Skip to content

Commit

Permalink
fix: adds missing command to /plugins verify
Browse files Browse the repository at this point in the history
  • Loading branch information
en3sis committed Feb 8, 2024
1 parent ac6dce2 commit bcf8fb8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/commands/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bcf8fb8

Please sign in to comment.