diff --git a/commands/forceEvaluate.cjs b/commands/forceEvaluate.cjs index 1d53a20..8e583b6 100644 --- a/commands/forceEvaluate.cjs +++ b/commands/forceEvaluate.cjs @@ -7,10 +7,13 @@ module.exports = { .addStringOption(option => option.setName('messageid') .setDescription("Message ID of message to evaluate") - .setRequired(false) + .setRequired(true) ), async execute(interaction, client) { - const messagefromId = await client.channels.cache.get(interaction.channel.id).messages.fetch(messageId); + if (interaction.options.getString('messageid') !== null) { + var messageId = interaction.options.getString('messageid'); + const messagefromId = await client.channels.cache.get(interaction.channel.id).messages.fetch(messageId); + } global.checkMessage(messagefromId); console.log("User " + interaction.user.tag + " ran /forceevaluate"); },