diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
commit | 453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 (patch) | |
tree | 8b98d2f30dbb6a8448602446cfacf9091667cc33 /src/commands/moulberry-bush | |
parent | de4c3dcaf172804d34ae708be1ed3e75af42f4d5 (diff) | |
download | tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.gz tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.bz2 tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.zip |
a few small changes
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r-- | src/commands/moulberry-bush/capePerms.ts | 27 | ||||
-rw-r--r-- | src/commands/moulberry-bush/capes.ts | 28 | ||||
-rw-r--r-- | src/commands/moulberry-bush/giveawayPing.ts | 8 | ||||
-rw-r--r-- | src/commands/moulberry-bush/moulHammer.ts | 22 | ||||
-rw-r--r-- | src/commands/moulberry-bush/report.ts | 41 | ||||
-rw-r--r-- | src/commands/moulberry-bush/rule.ts | 45 | ||||
-rw-r--r-- | src/commands/moulberry-bush/serverStatus.ts | 8 |
7 files changed, 62 insertions, 117 deletions
diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index 237ca89..2749430 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -7,31 +7,20 @@ export default class CapePermissionsCommand extends BushCommand { super('capePermissions', { aliases: ['cape-perms', 'cape-perm', 'cape-permissions'], category: "Moulberry's Bush", - description: { - content: 'A command to see what capes someone has access to.', - usage: ['cape-perms <user>'], - examples: ['cape-perms IRONM00N'] - }, + description: 'A command to see what capes someone has access to.', + usage: ['cape-perms <user>'], + examples: ['cape-perms IRONM00N'], args: [ { id: 'ign', + description: 'The ign of the player you would like to view the capes permissions of.', type: 'string', - prompt: { - start: 'Who would you like to see the cape permissions of?', - retry: '{error} Choose someone to see the capes their available capes.', - optional: false - } + prompt: 'Who would you like to see the cape permissions of?', + retry: '{error} Choose someone to see the capes their available capes.', + slashType: 'STRING' } ], slash: true, - slashOptions: [ - { - name: 'ign', - description: 'The ign of the player you would like to view the capes permissions of.', - type: 'STRING', - required: true - } - ], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), userPermissions: [], channel: 'guild' @@ -51,7 +40,7 @@ export default class CapePermissionsCommand extends BushCommand { let capePerms: CapePerms | null, uuid: string; try { - uuid = await util.findUUID(args.ign); + uuid = await util.mcUUID(args.ign); } catch (e) { return await message.util.reply(`${util.emojis.error} \`${args.ign}\` doesn't appear to be a valid username.`); } diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts index 0af0125..1734568 100644 --- a/src/commands/moulberry-bush/capes.ts +++ b/src/commands/moulberry-bush/capes.ts @@ -7,32 +7,22 @@ export default class CapesCommand extends BushCommand { super('capes', { aliases: ['capes', 'cape'], category: "Moulberry's Bush", - description: { - content: 'A command to see what a cape looks like.', - usage: ['cape [cape]'], - examples: ['capes', 'cape space'] - }, + description: 'A command to see what a cape looks like.', + usage: ['cape [cape]'], + examples: ['capes', 'cape space'], args: [ { id: 'cape', + description: 'The cape to view.', type: 'string', - prompt: { - start: 'What cape would you like to see?', - retry: '{error} Choose a cape to see.', - optional: true - }, - default: null + prompt: 'What cape would you like to see?', + retry: '{error} Choose a cape to see.', + optional: true, + slashType: 'STRING' + // choices: client.consts.mappings.capes.map((v) => ({ name: v.name, value: v.name })) } ], slash: true, - slashOptions: [ - { - name: 'cape', - description: 'What cape would you like to see?', - type: 'STRING', - required: false - } - ], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), userPermissions: [] }); diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index d76964c..28f920a 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -5,11 +5,9 @@ export default class GiveawayPingCommand extends BushCommand { super('giveawayPing', { aliases: ['giveaway-ping', 'giveaway-pong'], category: "Moulberry's Bush", - description: { - content: 'Pings the giveaway role.', - usage: ['giveaway-ping'], - examples: ['giveaway-ping'] - }, + description: 'Pings the giveaway role.', + usage: ['giveaway-ping'], + examples: ['giveaway-ping'], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['MANAGE_MESSAGES'], true), userPermissions: ['MANAGE_GUILD', 'MANAGE_MESSAGES', 'BAN_MEMBERS', 'KICK_MEMBERS', 'VIEW_CHANNEL'], channel: 'guild', diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index 98ef78f..2811f80 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '#lib'; +import { BushCommand, BushSlashMessage, type BushMessage } from '#lib'; import { MessageEmbed, type User } from 'discord.js'; export default class MoulHammerCommand extends BushCommand { @@ -6,28 +6,28 @@ export default class MoulHammerCommand extends BushCommand { super('moulHammer', { aliases: ['moul-hammer'], category: "Moulberry's Bush", - description: { - content: 'A command to moul hammer members.', - usage: ['moul-hammer <user>'], - examples: ['moul-hammer @IRONM00N'] - }, + description: 'A command to moul hammer members.', + usage: ['moul-hammer <user>'], + examples: ['moul-hammer @IRONM00N'], args: [ { id: 'user', + description: 'The user to moul hammer.', type: 'user', - prompt: { - start: 'What user would you like to moul hammer?', - retry: '{error} Choose a valid user to moul hammer' - } + prompt: 'What user would you like to moul hammer?', + retry: '{error} Choose a valid user to moul hammer', + slashType: 'USER' } ], + slash: true, + slashGuilds: ['516977525906341928'], restrictedGuilds: ['516977525906341928'], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), userPermissions: [] }); } - public override async exec(message: BushMessage, { user }: { user: User }) { + public override async exec(message: BushMessage | BushSlashMessage, { user }: { user: User }) { await message.delete(); const embed = new MessageEmbed() .setTitle('L') diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index d5e9731..2a0d06f 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -7,47 +7,30 @@ export default class ReportCommand extends BushCommand { super('report', { aliases: ['report'], category: "Moulberry's Bush", - description: { - content: 'A command to report a user.', - usage: ['report <user> <reason/evidence>'], - examples: ['report IRONM00N commands in #general'] - }, + description: 'A command to report a user.', + usage: ['report <user> <reason/evidence>'], + examples: ['report IRONM00N commands in #general'], args: [ { id: 'member', + description: 'The member to report.', type: 'member', - prompt: { - start: 'Who would you like to report?', - retry: `{error} Choose a valid user to report.`, - optional: false - } + prompt: 'Who would you like to report?', + retry: '{error} Choose a valid user to report.', + slashType: 'USER' }, { id: 'evidence', + description: 'The evidence to report the user for.', type: 'string', match: 'rest', - prompt: { - start: 'What did the user do wrong?', - retry: `{error} Provide evidence.`, - optional: true - } + prompt: 'What did the user do wrong?', + retry: '{error} Provide evidence.', + optional: true, + slashType: 'STRING' } ], slash: true, - slashOptions: [ - { - name: 'user', - description: 'Who would you like to report?', - type: 'USER', - required: true - }, - { - name: 'evidence', - description: 'What did the user do wrong?', - type: 'STRING', - required: false - } - ], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), userPermissions: [], channel: 'guild' diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index d4820fe..a88b323 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -55,46 +55,33 @@ export default class RuleCommand extends BushCommand { super('rule', { aliases: ['rule', 'rules'], category: "Moulberry's Bush", - description: { - content: 'A command to state a rule.', - usage: ['rule <rule> [user]'], - examples: ['rule 1 IRONM00N', 'rule 2', 'rules'] - }, + description: 'A command to state a rule.', + usage: ['rule <rule> [user]'], + examples: ['rule 1 IRONM00N', 'rule 2', 'rules'], args: [ { id: 'rule', + description: 'The rule to view.', customType: util.arg.range('integer', 1, rules.length, true), - prompt: { - start: 'What rule would you like to have cited?', - retry: '{error} Choose a valid rule.', - optional: true - } + readableType: 'integer', + prompt: 'What rule would you like to have cited?', + retry: '{error} Choose a valid rule.', + optional: true, + slashType: 'INTEGER', + minValue: 1, + maxValue: rules.length }, { id: 'user', + description: 'The user to mention.', type: 'user', - prompt: { - start: 'What user would you like to mention?', - retry: '{error} Choose a valid user to mention.', - optional: true - } + prompt: 'What user would you like to mention?', + retry: '{error} Choose a valid user to mention.', + optional: true, + slashType: 'USER' } ], slash: true, - slashOptions: [ - { - name: 'rule', - description: 'The rule you would you like to have cited', - type: 'INTEGER', - required: false - }, - { - name: 'user', - description: 'The user you would like to mention.', - type: 'USER', - required: false - } - ], slashGuilds: ['516977525906341928'], channel: 'guild', clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts index ff0023e..ac37684 100644 --- a/src/commands/moulberry-bush/serverStatus.ts +++ b/src/commands/moulberry-bush/serverStatus.ts @@ -7,11 +7,9 @@ export default class ServerStatusCommand extends BushCommand { super('serverStatus', { aliases: ['server-status', 'ss'], category: "Moulberry's Bush", - description: { - content: "Gives the status of moulberry's server", - usage: ['server-status'], - examples: ['server-status', 'ss'] - }, + description: "Gives the status of moulberry's server", + usage: ['server-status'], + examples: ['server-status', 'ss'], clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), userPermissions: [], slash: true |