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/context-menu-commands | |
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/context-menu-commands')
-rw-r--r-- | src/context-menu-commands/message/viewRaw.ts | 6 | ||||
-rw-r--r-- | src/context-menu-commands/user/userInfo.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/context-menu-commands/message/viewRaw.ts b/src/context-menu-commands/message/viewRaw.ts index 1ece8cd..c283635 100644 --- a/src/context-menu-commands/message/viewRaw.ts +++ b/src/context-menu-commands/message/viewRaw.ts @@ -1,18 +1,18 @@ import { ViewRawCommand } from '#commands'; import { type BushMessage } from '#lib'; import { ContextMenuCommand } from 'discord-akairo'; -import { type ContextMenuInteraction } from 'discord.js'; +import { ApplicationCommandType, type ContextMenuCommandInteraction } from 'discord.js'; export default class ViewRawContextMenuCommand extends ContextMenuCommand { public constructor() { super('viewRaw', { name: 'View Raw', - type: 'MESSAGE', + type: ApplicationCommandType.Message, category: 'message' }); } - public override async exec(interaction: ContextMenuInteraction) { + public override async exec(interaction: ContextMenuCommandInteraction) { await interaction.deferReply({ ephemeral: true }); const embed = await ViewRawCommand.getRawData(interaction.options.getMessage('message') as BushMessage, { json: false, diff --git a/src/context-menu-commands/user/userInfo.ts b/src/context-menu-commands/user/userInfo.ts index 0c43958..d6e8132 100644 --- a/src/context-menu-commands/user/userInfo.ts +++ b/src/context-menu-commands/user/userInfo.ts @@ -1,18 +1,18 @@ import { UserInfoCommand } from '#commands'; import { type BushGuild, type BushGuildMember, type BushUser } from '#lib'; import { ContextMenuCommand } from 'discord-akairo'; -import { type ContextMenuInteraction } from 'discord.js'; +import { ApplicationCommandType, type ContextMenuCommandInteraction } from 'discord.js'; export default class UserInfoContextMenuCommand extends ContextMenuCommand { public constructor() { super('userInfo', { name: 'User Info', - type: 'USER', + type: ApplicationCommandType.User, category: 'user' }); } - public override async exec(interaction: ContextMenuInteraction) { + public override async exec(interaction: ContextMenuCommandInteraction) { await interaction.deferReply({ ephemeral: true }); const user = (await interaction.user.fetch()) as BushUser; |