From 5a0046146fb2a697aead63d2af492db9f0ef9113 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 10 Aug 2022 10:27:35 -0400 Subject: update discord js and discord-akairo fix breaking changes add unverified bot emoji to user command --- src/commands/info/help.ts | 2 +- src/commands/info/userInfo.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/commands/info') diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index 492f25d..348c74f 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -86,7 +86,7 @@ export default class HelpCommand extends BushCommand { .setColor(colors.default) .setTimestamp() .setFooter({ text: `For more information about a command use ${prefix_}help ` }); - for (const [, category] of this.handler.categories) { + for (const [, category] of this.handler.categories.sort((a, b) => a.id.localeCompare(b.id))) { const categoryFilter = category.filter((command) => { if (command.pseudo) return false; if (command.hidden && !args.showHidden) return false; diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 7b67816..6def866 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -62,6 +62,7 @@ export default class UserInfoCommand extends BushCommand { : typeof args.user === 'object' ? args.user : await this.client.users.fetch(`${args.user}`).catch(() => undefined); + if (user === undefined) return message.util.reply(`${emojis.error} Invalid user.`); const member = message.guild ? await message.guild.members.fetch(user.id).catch(() => undefined) : undefined; await user.fetch(true); // gets banner info and accent color @@ -85,6 +86,9 @@ export default class UserInfoCommand extends BushCommand { // Flags if (user.client.config.owners.includes(user.id)) emojis.push(mappings.otherEmojis.Developer); if (superUsers.includes(user.id)) emojis.push(mappings.otherEmojis.Superuser); + + if (user.bot) emojis.push(mappings.otherEmojis.Bot); + const flags = user.flags?.toArray(); if (flags) { flags.forEach((f) => { -- cgit