21 lines
836 B
JavaScript
21 lines
836 B
JavaScript
const { SlashCommandBuilder, Discord } = require('discord.js');
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('forceevaluate')
|
|
.setDescription('Makes the bot re-evaluate a message even if that person is exempt for a single message.')
|
|
.addStringOption(option =>
|
|
option.setName('messageid')
|
|
.setDescription("Message ID of message to evaluate")
|
|
.setRequired(true)
|
|
),
|
|
async execute(interaction, client) {
|
|
var messageId = interaction.options.getString('messageid');
|
|
const messagefromId = await client.channels.cache.get(interaction.channel.id).messages.fetch(messageId);
|
|
global.tylerStop(messagefromId);
|
|
global.checkMessage(messagefromId, true);
|
|
interaction.reply({content: "Checking message...", ephemeral: false});
|
|
console.log("User " + interaction.user.tag + " ran /forceevaluate");
|
|
},
|
|
};
|