From 048f99752550c6e03d1990a03cad78f3ac7d73aa Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 5 Sep 2022 17:36:42 -0400 Subject: revamp command permissions, fix permission exploit for some command when used in forum channels, use enums more --- src/context-menu-commands/message/viewRaw.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/context-menu-commands/message') 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 }); -- cgit