blob: ebf8be7bba52a8ee700c2b230c76d444e167ad49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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] });
}
}
|