ajout de la fonctionnalité randomducul
This commit is contained in:
parent
61798a6067
commit
87d30f7896
@ -5,6 +5,13 @@ module.exports = {
|
||||
.setName('randomducul')
|
||||
.setDescription('Un truc random. Du cul.'),
|
||||
async execute(interaction) {
|
||||
await interaction.reply('Pong!');
|
||||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./fr.txt', 'utf8', (err, data) => {
|
||||
if(err) console.log(err);return;
|
||||
});
|
||||
var wordsFR = file.toString().split('\n');
|
||||
let rand = Math.floor(Math.random() * wordsFR.length);
|
||||
const reply = wordsFR[rand].trim();
|
||||
await interaction.reply( reply + ' du cul !');
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user