const bot = require('bbot'); const exec = require('child_process').exec; const fs = require('fs'); bot.global.text({ contains: ['vtfn','si tes pas content','si t\'es pas content'] }, (b) => b.respond(":arrow_right: https://vatefairecuireunnem.com/"), { id: 'joke-vtfn' }) bot.global.text({ contains: ['biz présente toi'] }, (b) => b.respond(":arrow_right: https://matiou.biz"), { id: 'joke-presente' }) // L'infernal matiou sur les MLC ... let bizbi = fs.readFileSync('./src/inc/repliques-mlc.txt', 'utf8'); bizbi = bizbi.split('\n') function randomize(toRand) { resultRand = toRand[Math.floor(Math.random()*toRand.length)] return resultRand; } bot.global.text({ contains: ['mlc'] }, (b) => b.respond(randomize(bizbi)), { id: 'joke-presente' })