aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-10 10:27:35 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-10 10:27:35 -0400
commit5a0046146fb2a697aead63d2af492db9f0ef9113 (patch)
tree981bf0808e465d5d692482d18437c80715ae3563 /src/commands/info
parentf1973996dc5f1790df3f72af75732a0d250a14e2 (diff)
downloadtanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.tar.gz
tanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.tar.bz2
tanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.zip
update discord js and discord-akairo
fix breaking changes add unverified bot emoji to user command
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/help.ts2
-rw-r--r--src/commands/info/userInfo.ts4
2 files changed, 5 insertions, 1 deletions
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 <command>` });
- 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) => {