diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/config/config.ts | 4 | ||||
-rw-r--r-- | src/commands/dev/eval.ts | 3 | ||||
-rw-r--r-- | src/commands/dev/say.ts | 12 | ||||
-rw-r--r-- | src/commands/dev/sh.ts | 13 | ||||
-rw-r--r-- | src/commands/info/help.ts | 2 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 4 |
6 files changed, 12 insertions, 26 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index f2b4284..f6b8bfa 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -24,9 +24,9 @@ import { ButtonBuilder, ButtonStyle, EmbedBuilder, - Formatters, GuildMember, InteractionUpdateOptions, + italic, PermissionFlagsBits, Role, SelectMenuBuilder, @@ -371,7 +371,7 @@ export default class ConfigCommand extends BushCommand { new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'command_settingsBack', label: 'Back' }) ); settingsEmbed.setDescription( - `${Formatters.italic(guildSettingsObj[setting].description)}\n\n**Type:** ${guildSettingsObj[setting].type}` + `${italic(guildSettingsObj[setting].description)}\n\n**Type:** ${guildSettingsObj[setting].type}` ); settingsEmbed.setFooter({ diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index a317e00..04db2eb 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -4,7 +4,6 @@ import { assertAll, BushCommand, BushInspectOptions, - clientSendAndPermCheck, CodeBlockLang, colors, emojis, @@ -175,7 +174,7 @@ export default class EvalCommand extends BushCommand { ], slash: true, ownerOnly: true, - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: [], userPermissions: [] }); } diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts index 2246588..c7b3c40 100644 --- a/src/commands/dev/say.ts +++ b/src/commands/dev/say.ts @@ -1,12 +1,4 @@ -import { - AllowedMentions, - BushCommand, - clientSendAndPermCheck, - emojis, - type ArgType, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { AllowedMentions, BushCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; export default class SayCommand extends BushCommand { @@ -29,7 +21,7 @@ export default class SayCommand extends BushCommand { } ], ownerOnly: true, - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: [], userPermissions: [], slash: true }); diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index 609129d..56a3b69 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -1,13 +1,4 @@ -import { - ArgType, - BushCommand, - clientSendAndPermCheck, - colors, - emojis, - formatError, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { ArgType, BushCommand, colors, emojis, formatError, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import chalk from 'chalk'; import { exec } from 'child_process'; @@ -44,7 +35,7 @@ export default class ShCommand extends BushCommand { } ], ownerOnly: true, - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: [], userPermissions: [] }); } 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) => { |