From b60e681998a456adecb93b5fe04b66ad4ac9abb6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 21 Mar 2025 22:24:53 -0400 Subject: Minor code fixes; Ditching settings on Discord in favour of using an API --- bot/src/commands/eval.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bot/src/commands/eval.js') diff --git a/bot/src/commands/eval.js b/bot/src/commands/eval.js index 598c7fd..68f3003 100644 --- a/bot/src/commands/eval.js +++ b/bot/src/commands/eval.js @@ -1,14 +1,13 @@ -import { SlashCommandBuilder } from 'discord.js'; +import { MessageFlags, SlashCommandBuilder } from 'discord.js'; import { inspect } from 'util'; import { userWhitelist } from '../storage/consts.js'; - export default { data: new SlashCommandBuilder() .setName('eval') .setDescription('Evaluates code'), async execute(interaction) { - if (!userWhitelist.includes(interaction.user.id)) return await interaction.reply('Nope! You don\'t have permission to use this command.'); + if (!userWhitelist.includes(interaction.user.id)) return await interaction.reply({ content: 'Nope! You don\'t have permission to use this command.', flags: MessageFlags.Ephemeral }); await interaction.reply('You have entered evaluation mode. Enter the code for AleeBot to evaluate.\nType in `exit` to exit evaluation mode.'); let evaled; -- cgit v1.2.3