diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-29 16:17:48 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-29 16:17:48 -0500 |
commit | 4cebaca70939b87c78537c5c3cd099e29e2e4e04 (patch) | |
tree | 3cac2d6948b8398cd1e6cbc4fb040bf4f635a18d /src/commands/info | |
parent | fbafd023546315541c12c068b8125ded2b84b733 (diff) | |
download | tanzanite-4cebaca70939b87c78537c5c3cd099e29e2e4e04.tar.gz tanzanite-4cebaca70939b87c78537c5c3cd099e29e2e4e04.tar.bz2 tanzanite-4cebaca70939b87c78537c5c3cd099e29e2e4e04.zip |
use new setFooter overload
Diffstat (limited to 'src/commands/info')
-rw-r--r-- | src/commands/info/help.ts | 4 | ||||
-rw-r--r-- | src/commands/info/ping.ts | 7 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 19 |
3 files changed, 22 insertions, 8 deletions
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index 277017e..e1e9844 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, BushMessage, BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; import packageDotJSON from '../../../package.json' assert { type: 'json' }; @@ -55,7 +55,7 @@ export default class HelpCommand extends BushCommand { if (!isOwner) args.showHidden = false; if (!command || command.pseudo) { const embed = new MessageEmbed().setColor(util.colors.default).setTimestamp(); - embed.setFooter(`For more information about a command use ${prefix}help <command>`); + embed.setFooter({ text: `For more information about a command use ${prefix}help <command>` }); for (const [, category] of this.handler.categories) { const categoryFilter = category.filter((command) => { if (command.pseudo) return false; diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index 619971f..a156368 100644 --- a/src/commands/info/ping.ts +++ b/src/commands/info/ping.ts @@ -24,7 +24,7 @@ export default class PingCommand extends BushCommand { .setTitle('Pong! 🏓') .addField('Bot Latency', botLatency, true) .addField('API Latency', apiLatency, true) - .setFooter(message.author.username, message.author.displayAvatarURL({ dynamic: true })) + .setFooter({ text: message.author.username, iconURL: message.author.displayAvatarURL({ dynamic: true }) }) .setColor(util.colors.default) .setTimestamp(); await sentMessage.edit({ @@ -43,7 +43,10 @@ export default class PingCommand extends BushCommand { .setTitle('Pong! 🏓') .addField('Bot Latency', botLatency, true) .addField('API Latency', apiLatency, true) - .setFooter(message.interaction.user.username, message.interaction.user.displayAvatarURL({ dynamic: true })) + .setFooter({ + text: message.interaction.user.username, + iconURL: message.interaction.user.displayAvatarURL({ dynamic: true }) + }) .setColor(util.colors.default) .setTimestamp(); await message.interaction.editReply({ diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 9c7a2a7..f8c7c68 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -1,4 +1,12 @@ -import { ArgType, BushCommand, BushGuild, BushGuildMember, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; +import { + BushCommand, + type ArgType, + type BushGuild, + type BushGuildMember, + type BushMessage, + type BushSlashMessage, + type BushUser +} from '#lib'; import { MessageEmbed } from 'discord.js'; // TODO: Add bot information @@ -144,7 +152,10 @@ export default class UserInfoCommand extends BushCommand { offline = '787550565382750239', invisible = '787550565382750239' } - userEmbed.setFooter(user.tag, client.emojis.cache.get(statusEmojis[member?.presence.status])?.url ?? undefined); + userEmbed.setFooter({ + text: user.tag, + iconURL: client.emojis.cache.get(statusEmojis[member?.presence.status])?.url ?? undefined + }); } // roles @@ -160,8 +171,8 @@ export default class UserInfoCommand extends BushCommand { const perms = []; if (member?.permissions.has('ADMINISTRATOR') || guild?.ownerId == user.id) { perms.push('`Administrator`'); - } else if (member?.permissions.toArray(false).length) { - member.permissions.toArray(false).forEach((permission) => { + } else if (member?.permissions.toArray().length) { + member.permissions.toArray().forEach((permission) => { if (client.consts.mappings.permissions[permission]?.important) { perms.push(`\`${client.consts.mappings.permissions[permission].name}\``); } |