aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/muteRole.ts4
-rw-r--r--src/commands/config/prefix.ts2
-rw-r--r--src/commands/config/punishmentFooter.ts51
3 files changed, 54 insertions, 3 deletions
diff --git a/src/commands/config/muteRole.ts b/src/commands/config/muteRole.ts
index 9a172be..1bec4a9 100644
--- a/src/commands/config/muteRole.ts
+++ b/src/commands/config/muteRole.ts
@@ -8,8 +8,8 @@ export default class MuteRoleCommand extends BushCommand {
category: 'config',
description: {
content: 'Configure what role to use when muting users.',
- usage: 'prefix [prefix]',
- examples: ['prefix', 'prefix +']
+ usage: 'muterole <role>',
+ examples: ['muterole 748912426581229690']
},
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'],
diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts
index dc51671..4624e99 100644
--- a/src/commands/config/prefix.ts
+++ b/src/commands/config/prefix.ts
@@ -8,7 +8,7 @@ export default class PrefixCommand extends BushCommand {
description: {
content: 'Set or reset the prefix for the server.',
usage: 'prefix [prefix]',
- examples: ['prefix', 'prefix +']
+ examples: ['prefix', 'prefix -']
},
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'],
diff --git a/src/commands/config/punishmentFooter.ts b/src/commands/config/punishmentFooter.ts
new file mode 100644
index 0000000..3a246df
--- /dev/null
+++ b/src/commands/config/punishmentFooter.ts
@@ -0,0 +1,51 @@
+import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib';
+import { Util } from 'discord.js';
+
+export default class PunishmentFooterCommand extends BushCommand {
+ public constructor() {
+ super('punishmentFooter', {
+ aliases: ['punishmentfooter'],
+ category: 'config',
+ description: {
+ content: 'Configure or reset what should follow all punishment related dms.',
+ usage: 'punishmentfooter [message]',
+ examples: ['punishmentfooter', 'prefix you can appeal at https://example.com.']
+ },
+ clientPermissions: ['SEND_MESSAGES'],
+ userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'],
+ args: [
+ {
+ id: 'ending',
+ type: 'string',
+ match: 'restContent',
+ prompt: {
+ start: 'What message would you like to follow punishment dms?',
+ retry: '{error} Choose a valid role.',
+ optional: true
+ }
+ }
+ ],
+ slash: true,
+ slashOptions: [
+ {
+ name: 'ending',
+ description: 'What message would you like to follow punishment dms?',
+ type: 'STRING',
+ required: false
+ }
+ ]
+ });
+ }
+
+ async exec(message: BushMessage | BushSlashMessage, args: { ending: string }): Promise<unknown> {
+ await message.guild.setSetting('punishmentEnding', args.ending || null);
+ if (args.ending)
+ return await message.util.send({
+ content: `${
+ this.client.util.emojis.success
+ } Changed the server's punishment footer to \n\`\`\`${Util.cleanCodeBlockContent(args.ending)}\`\`\`.`,
+ allowedMentions: AllowedMentions.none()
+ });
+ else return await message.util.send(`${this.client.util.emojis.success} Removed he server's punishment footer.`);
+ }
+}