Add warning system, role management, and guessing game

This commit is contained in:
2026-01-27 09:53:03 +01:00
parent 2edcf2ccf6
commit 31e9169231
5 changed files with 256 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('guess')
.setDescription('Try to guess a number between 1 and 10.')
.addIntegerOption(option =>
option
.setName('number')
.setDescription('Your guess (1-10)')
.setMinValue(1)
.setMaxValue(10)
.setRequired(true)),
category: 'Unique',
async execute(interaction) {
const guess = interaction.options.getInteger('number');
const answer = Math.floor(Math.random() * 10) + 1;
if (guess === answer) {
return interaction.reply({
content: `🎉 Correct! The number was **${answer}**.`,
});
}
return interaction.reply({
content: `Not quite! The number was **${answer}**. Try again!`,
});
},
};