aboutsummaryrefslogtreecommitdiff
path: root/src/context-menu-commands/message/viewRaw.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-09-05 17:36:42 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-09-05 17:36:42 -0400
commit048f99752550c6e03d1990a03cad78f3ac7d73aa (patch)
treec238ac29b1b526e86bcbc4989036df981c860187 /src/context-menu-commands/message/viewRaw.ts
parent6f8a4d13a490eda7a195d14833c83810f7b5a789 (diff)
downloadtanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.tar.gz
tanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.tar.bz2
tanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.zip
revamp command permissions, fix permission exploit for some command when used in forum channels, use enums more
Diffstat (limited to 'src/context-menu-commands/message/viewRaw.ts')
-rw-r--r--src/context-menu-commands/message/viewRaw.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/context-menu-commands/message/viewRaw.ts b/src/context-menu-commands/message/viewRaw.ts
index f216a59..0a8fcfc 100644
--- a/src/context-menu-commands/message/viewRaw.ts
+++ b/src/context-menu-commands/message/viewRaw.ts
@@ -1,6 +1,6 @@
import { ContextMenuCommand } from 'discord-akairo';
import { ApplicationCommandType, type ContextMenuCommandInteraction, type Message } from 'discord.js';
-import ViewRawCommand from '../../commands/utilities/viewRaw.js';
+import { getRawData } from '../../commands/utilities/viewRaw.js';
export default class ViewRawContextMenuCommand extends ContextMenuCommand {
public constructor() {
@@ -13,7 +13,10 @@ export default class ViewRawContextMenuCommand extends ContextMenuCommand {
public override async exec(interaction: ContextMenuCommandInteraction) {
await interaction.deferReply({ ephemeral: true });
- const embed = await ViewRawCommand.getRawData(interaction.options.getMessage('message') as Message, {
+
+ const message = interaction.options.getMessage('message') as Message;
+
+ const embed = await getRawData(message, {
json: false,
js: false
});