diff options
Diffstat (limited to 'src/commands/config/joinRoles.ts')
-rw-r--r-- | src/commands/config/joinRoles.ts | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/src/commands/config/joinRoles.ts b/src/commands/config/joinRoles.ts index 0b9ac21..2a3031e 100644 --- a/src/commands/config/joinRoles.ts +++ b/src/commands/config/joinRoles.ts @@ -1,5 +1,4 @@ -import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { Role } from 'discord.js'; +import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; export default class JoinRolesCommand extends BushCommand { public constructor() { @@ -7,46 +6,18 @@ export default class JoinRolesCommand extends BushCommand { aliases: ['joinroles', 'joinrole', 'jr'], category: 'config', description: { - content: 'Configure what roles to assign to someone when they join the server.', + content: 'This command has been deprecated, please use the config command instead', usage: 'joinroles <role>', examples: ['joinroles @member'] }, - args: [ - { - id: 'role', - type: 'role', - prompt: { - start: 'What role would you like me to assign to users when they join the server?', - retry: '{error} Choose a valid role', - optional: true - } - } - ], - slash: true, - slashOptions: [ - { - name: 'role', - description: 'What role would you like me to assign to users when they join the server?', - type: 'ROLE', - required: false - } - ], channel: 'guild', + hidden: true, clientPermissions: ['SEND_MESSAGES'], userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'] }); } - public override async exec(message: BushMessage | BushSlashMessage, { role }: { role: Role }): Promise<unknown> { - const joinRoles = await message.guild!.getSetting('joinRoles'); - const includes = joinRoles.includes(role.id); - const newValue = util.addOrRemoveFromArray(includes ? 'remove' : 'add', joinRoles, role.id); - await message.guild!.setSetting('joinRoles', newValue); - return await message.util.reply({ - content: `${util.emojis.success} Successfully ${includes ? 'removed' : 'added'} <@&${role.id}> ${ - includes ? 'from' : 'to' - }from being assigned to members when they join the server.`, - allowedMentions: AllowedMentions.none() - }); + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + return message.util.reply(`${util.emojis.error} 'This command has been deprecated, please use the config command instead'`); } } |