diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-24 15:58:13 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-24 15:58:13 -0400 |
commit | 423fb144a0209c7acb74dc756faa37e19b7aa905 (patch) | |
tree | 0b1af0e794efabf51ee0f86c3b56cd66627f619a /src/context-menu-commands/message/viewRaw.ts | |
parent | 9390b3f59b18dc3576f9c169c8fc586be14bcdc5 (diff) | |
download | tanzanite-423fb144a0209c7acb74dc756faa37e19b7aa905.tar.gz tanzanite-423fb144a0209c7acb74dc756faa37e19b7aa905.tar.bz2 tanzanite-423fb144a0209c7acb74dc756faa37e19b7aa905.zip |
some fixes and hacky fetch member work arround
Diffstat (limited to 'src/context-menu-commands/message/viewRaw.ts')
-rw-r--r-- | src/context-menu-commands/message/viewRaw.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/context-menu-commands/message/viewRaw.ts b/src/context-menu-commands/message/viewRaw.ts new file mode 100644 index 0000000..c04ec3c --- /dev/null +++ b/src/context-menu-commands/message/viewRaw.ts @@ -0,0 +1,23 @@ +import { ContextMenuCommand } from 'discord-akairo'; +import { ContextMenuInteraction } from 'discord.js'; +import ViewRawCommand from '../../commands/utilities/viewraw'; +import { BushMessage } from '../../lib'; + +export default class ViewRawContextMenuCommand extends ContextMenuCommand { + public constructor() { + super('viewRaw', { + name: 'View Raw', + type: 'MESSAGE', + category: 'message' + }); + } + + public override async exec(interaction: ContextMenuInteraction): Promise<unknown> { + await interaction.deferReply({ ephemeral: true }); + const embed = await ViewRawCommand.getRawData(interaction.options.getMessage('message') as BushMessage, { + json: false, + js: false + }); + return await interaction.editReply({ embeds: [embed] }); + } +} |