You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
379 B
JavaScript
14 lines
379 B
JavaScript
const { SlashCommandBuilder } = require('@discordjs/builders');
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('roll')
|
|
.setDescription('Rolls a die'),
|
|
async execute(interaction) {
|
|
let die_sides = 6;
|
|
let random_number = Math.floor(Math.random() * die_sides) + 1;
|
|
await interaction.reply(`${interaction.user.username} rolled a ${random_number}`);
|
|
},
|
|
};
|
|
|