From 81d69f983983ac71dbdbd5f13e2f2d8ddc35dced Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 5 Sep 2021 13:45:44 -0400 Subject: cleaning up and some imporvements to the stats command --- src/commands/utilities/price.ts | 1 - src/commands/utilities/whoHasRole.ts | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/commands/utilities') diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index 64d335d..9ef997a 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -137,7 +137,6 @@ export default class PriceCommand extends BushCommand { threshold: 0.7, ignoreLocation: true })?.search(parsedItem); - client.console.debug(_, 4); parsedItem = _[0]?.item; } diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index 73a9920..f096cee 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -1,5 +1,5 @@ import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { Role, Util } from 'discord.js'; +import { CommandInteraction, Role, Util } from 'discord.js'; export default class WhoHasRoleCommand extends BushCommand { public constructor() { @@ -38,15 +38,11 @@ export default class WhoHasRoleCommand extends BushCommand { }); } public override async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise { - // console.time('whohasrole1'); + if (message.util.isSlash) await (message.interaction as CommandInteraction).deferReply(); const roleMembers = args.role.members.map((member) => `${member.user} (${Util.escapeMarkdown(member.user.tag)})`); - // console.timeEnd('whohasrole1'); - // console.time('whohasrole2'); const chunkedRoleMembers = util.chunk(roleMembers, 30); - // console.timeEnd('whohasrole2'); - // console.time('whohasrole3'); const title = `${args.role.name}'s Members [\`${args.role.members.size.toLocaleString()}\`]`; const color = util.colors.default; const embedPages = chunkedRoleMembers.map((chunk) => ({ @@ -54,7 +50,6 @@ export default class WhoHasRoleCommand extends BushCommand { description: chunk.join('\n'), color })); - // console.timeEnd('whohasrole3'); return await util.buttonPaginate(message, embedPages, null, true); } -- cgit