aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 13:29:19 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 13:29:19 -0400
commiteaaae08aeee1fa16a4e1ad0b26fceb42885bfcde (patch)
tree6c1501af87225b478c9ebdc39e0712e0d4835a08 /src/commands/config
parent070b5f326d0647e7b105f99811e4bdc915c8652e (diff)
downloadtanzanite-eaaae08aeee1fa16a4e1ad0b26fceb42885bfcde.tar.gz
tanzanite-eaaae08aeee1fa16a4e1ad0b26fceb42885bfcde.tar.bz2
tanzanite-eaaae08aeee1fa16a4e1ad0b26fceb42885bfcde.zip
add punishent footer command
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.`);
+ }
+}