added /forceevaluate

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-04-09 22:34:26 -05:00
parent 0bbae4f4db
commit 7e56e2f713

View File

@ -7,10 +7,13 @@ module.exports = {
.addStringOption(option => .addStringOption(option =>
option.setName('messageid') option.setName('messageid')
.setDescription("Message ID of message to evaluate") .setDescription("Message ID of message to evaluate")
.setRequired(false) .setRequired(true)
), ),
async execute(interaction, client) { 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); global.checkMessage(messagefromId);
console.log("User " + interaction.user.tag + " ran /forceevaluate"); console.log("User " + interaction.user.tag + " ran /forceevaluate");
}, },