tidy up
This commit is contained in:
parent
2962784d70
commit
75891dd165
1 changed files with 0 additions and 0 deletions
16
commands.js
Normal file
16
commands.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import { getRandomFact } from '../utils/factRandomizer.js';
|
||||
|
||||
export default {
|
||||
// définition de la commande pour Discord
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('funfact') // correspondra à /funfact
|
||||
.setDescription('Donne un fait aléatoire et inutile'),
|
||||
|
||||
// action
|
||||
async execute(interaction) {
|
||||
const fact = getRandomFact();
|
||||
// interaction.reply plutôt que message.reply
|
||||
await interaction.reply(`💡 **Fun fact : **\n${fact}`);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue