diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
commit | a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch) | |
tree | 9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/commands/utilities/viewRaw.ts | |
parent | 5557677f1570eb564a30cfcebb6030235dc84d47 (diff) | |
download | tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2 tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip |
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/commands/utilities/viewRaw.ts')
-rw-r--r-- | src/commands/utilities/viewRaw.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/utilities/viewRaw.ts b/src/commands/utilities/viewRaw.ts index b524b3c..4b1ff1e 100644 --- a/src/commands/utilities/viewRaw.ts +++ b/src/commands/utilities/viewRaw.ts @@ -7,7 +7,7 @@ import { type BushTextChannel, type OptionalArgType } from '#lib'; -import { Message, MessageEmbed, type Snowflake } from 'discord.js'; +import { ApplicationCommandOptionType, Message, MessageEmbed, Permissions, type Snowflake } from 'discord.js'; export default class ViewRawCommand extends BushCommand { public constructor() { @@ -25,7 +25,7 @@ export default class ViewRawCommand extends BushCommand { readableType: 'guildMessage|messageLink', prompt: 'What message would you like to view?', retry: '{error} Choose a valid message.', - slashType: 'STRING' + slashType: ApplicationCommandOptionType.String }, { id: 'channel', @@ -34,8 +34,8 @@ export default class ViewRawCommand extends BushCommand { prompt: 'What channel is the message in?', retry: '{error} Choose a valid channel.', optional: true, - slashType: 'CHANNEL', - channelTypes: util.discordConstants.TextBasedChannelTypes + slashType: ApplicationCommandOptionType.Channel, + channelTypes: ['GuildText', 'DM', 'GuildNews', 'GuildNewsThread', 'GuildPublicThread', 'GuildPrivateThread'] }, { id: 'json', @@ -43,7 +43,7 @@ export default class ViewRawCommand extends BushCommand { match: 'flag', flag: '--json', prompt: 'Would you like to view the raw JSON message data?', - slashType: 'BOOLEAN', + slashType: ApplicationCommandOptionType.Boolean, optional: true }, { @@ -52,13 +52,13 @@ export default class ViewRawCommand extends BushCommand { match: 'flag', flag: '--js', prompt: 'Would you like to view the raw message data?', - slashType: 'BOOLEAN', + slashType: ApplicationCommandOptionType.Boolean, optional: true } ], slash: true, channel: 'guild', - clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), + clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true), userPermissions: [] }); } @@ -96,7 +96,7 @@ export default class ViewRawCommand extends BushCommand { : message.content || '[No Content]'; const lang = options.json ? 'json' : options.js ? 'js' : undefined; return new MessageEmbed() - .setFooter({ text: message.author.tag, iconURL: message.author.avatarURL({ dynamic: true }) ?? undefined }) + .setFooter({ text: message.author.tag, iconURL: message.author.avatarURL() ?? undefined }) .setTimestamp(message.createdTimestamp) .setColor(message.member?.roles?.color?.color ?? util.colors.default) .setTitle('Raw Message Information') |