diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-04 12:39:08 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-04 12:39:08 -0400 |
commit | bb774bbe0cfedd77be852f73448df061252b7c0a (patch) | |
tree | 579c2f11717dd5aa3a0d6ea990479368b338cd66 /src/commands | |
parent | 939f19c1a8a7efea00fc3df3504a41fc58a3b286 (diff) | |
download | tanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.tar.gz tanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.tar.bz2 tanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.zip |
I sure do love when one line causes 400 errors
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/admin/roleAll.ts | 18 | ||||
-rw-r--r-- | src/commands/moulberry-bush/moulHammer.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/wolframAlpha.ts | 2 |
3 files changed, 9 insertions, 13 deletions
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index 7e60f40..5e891ee 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -37,12 +37,10 @@ export default class RoleAllCommand extends BushCommand { public override async exec(message: BushMessage, args: { role: Role; bot?: boolean }): Promise<unknown> { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`); if (!message.member!.permissions.has('ADMINISTRATOR')) - return await message.util.reply(`${this.client.util.emojis.error} You must have admin perms to use this command.`); + return await message.util.reply(`${util.emojis.error} You must have admin perms to use this command.`); if (args.role.comparePositionTo(message.guild.me!.roles.highest) >= 0 && !args.role) { - return await message.util.reply( - `${this.client.util.emojis.error} I cannot assign a role higher or equal to my highest role.` - ); + return await message.util.reply(`${util.emojis.error} I cannot assign a role higher or equal to my highest role.`); } let members = await message.guild.members.fetch(); @@ -57,7 +55,7 @@ export default class RoleAllCommand extends BushCommand { return true; }); - await message.util.reply(`${this.client.util.emojis.loading} adding roles to ${members.size} members`); + await message.util.reply(`${util.emojis.loading} adding roles to ${members.size} members`); console.timeEnd('roleAll3'); const promises = members.map((member: GuildMember) => { @@ -68,7 +66,7 @@ export default class RoleAllCommand extends BushCommand { if (!failed.length) { await message.util.reply({ - content: `${this.client.util.emojis.success} Finished adding <@&${args.role.id}> to **${members.size}** member${ + content: `${util.emojis.success} Finished adding <@&${args.role.id}> to **${members.size}** member${ members.size ? 's' : '' }.`, allowedMentions: AllowedMentions.none() @@ -76,11 +74,9 @@ export default class RoleAllCommand extends BushCommand { } else { const array = [...members.values()]; await message.util.reply({ - content: `${this.client.util.emojis.warn} Finished adding <@&${args.role.id}> to **${ - members.size - failed.length - }** member${members.size - failed.length ? 's' : ''}! Failed members:\n${failed - .map((_, index) => `<@${array[index].id}>`) - .join(' ')}`, + content: `${util.emojis.warn} Finished adding <@&${args.role.id}> to **${members.size - failed.length}** member${ + members.size - failed.length ? 's' : '' + }! Failed members:\n${failed.map((_, index) => `<@${array[index].id}>`).join(' ')}`, allowedMentions: AllowedMentions.none() }); } diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index bc60372..8e78031 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -32,7 +32,7 @@ export default class MoulHammerCommand extends BushCommand { const embed = new MessageEmbed() .setTitle('L') .setDescription(`${user.username} got moul'ed <:wideberry1:756223352598691942><:wideberry2:756223336832303154>`) - .setColor(this.client.util.colors.purple); + .setColor(util.colors.purple); await message.util.send({ embeds: [embed] }); } } diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts index c18646c..88dc65a 100644 --- a/src/commands/utilities/wolframAlpha.ts +++ b/src/commands/utilities/wolframAlpha.ts @@ -39,7 +39,7 @@ export default class WolframAlphaCommand extends BushCommand { }); } public override async exec(message: BushMessage | BushSlashMessage, args: { expression: string }): Promise<unknown> { - const waApi = WolframAlphaAPI(this.client.config.credentials.wolframAlphaAppId); + const waApi = WolframAlphaAPI(client.config.credentials.wolframAlphaAppId); const decodedEmbed = new MessageEmbed().addField('📥 Input', await util.inspectCleanRedactCodeblock(args.expression)); try { |