Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js')
- const bot = new Discord.Client()
- bot.on("ready", () => {
- bot.user.setActivity('ouvrir des box');
- console.log(`Bot en ligne!\n${bot.users.size} utilisateurs, dans ${bot.guilds.size} serveurs connectés.`);
- });
- var randnum = 0;
- function random(min, max) {
- min = Math.ceil(0);
- max = Math.floor(1000);
- randnum = Math.floor(Math.random() * (max - min +1) +min);
- }
- bot.login('NjYxOTE1NzY0MDg5MDI4NjE5.XgyYYA.qv_GyafDoxLb4oVgdHBhMtupYzc')
- bot.on('message', message =>{
- if(message.content == '$box use' && message.member.roles.has(661920046242856991)){
- random();
- if (randnum == 0 ){
- message.reply('Tu as gagné le paradis 4!')
- console.log(randnum);
- }
- if (randnum >= 1 && randnum <= 5){
- message.reply('Tu as gagné le paradis 3! ')
- console.log(randnum);
- }
- if (randnum >= 6 && randnum <= 55){
- message.reply('Tu as gagné le paradis 2!')
- console.log(randnum);
- }
- if (randnum >= 56 && randnum <= 205){
- message.reply('Tu as gagné le paradis 1!')
- console.log(randnum);
- }
- if (randnum >= 206 && randnum <= 255){
- message.reply('Tu as gagné la banque de bourgeoisie!')
- console.log(randnum);
- }
- if (randnum >= 256 && randnum <= 295){
- message.reply('Tu as gagné un role VIP!')
- console.log(randnum);
- }
- if (randnum >= 296 && randnum <= 445){
- message.reply('Tu as gagné le rôle Peintre!')
- console.log(randnum);
- }
- if (randnum >= 446 && randnum <= 449){
- message.reply('Tu as gagné 1 million de poulets !')
- console.log(randnum);
- }
- if (randnum >= 450 && randnum <= 499){
- message.reply('Tu as gagné 100k de poulets!')
- console.log(randnum);
- }
- if (randnum == 500 && randnum <= 649){
- message.reply('Tu as gagné 10000 poulets!')
- console.log(randnum);
- }
- if (randnum >= 650 && randnum <= 749){
- message.reply('Tu as gagné 12000 poulets!')
- console.log(randnum);
- }
- if (randnum == 750 && randnum <= 899){
- message.reply('Tu as gagné 5000 poulets!')
- console.log(randnum);
- }
- if (randnum == 900 && randnum <= 1000){
- message.reply("Tu as gagné 1000 poulets")
- console.log(randnum);
- }
- }
- else {
- message.channel.send("Tu n'as pas le rôle pour ouvrir des box")
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment