Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- module.exports.run = async (bot, message, args) => {
- let slots = ["🍎","🍌","🍒","🍐","🍓"];
- let result1 = Math.floor((Math.random() * slots.lenght));
- let result2 = Math.floor((Math.random() * slots.lenght));
- let result3 = Math.floor((Math.random() * slots.lenght));
- let name = message.author.displayName;
- let icon = message.author.displayAvatarURL;
- if (slots[result1] === slots[results2] && slots[result3]) {
- let wEmbed = new Discord.RichEmbed()
- .setFooter('Tu as gagné!', icon)
- .setTitle(':slot_machine: Slots :slot_machine:')
- .addField('Résultat:', slots[result1] + slots[result2] + slots[result3], true)
- .setcolor(0xF4E842)
- message.channel.send(wEmbed);
- } else {
- let lEmbed = new Discord.RichEmbed()
- .setFooter('Tu as perdu!', icon)
- .setTitle(':slot_machine: Slots :slot_machine:')
- .addField('Résultat:', slots[result1] + slots[result2] + slots[result3], true)
- .setcolor(0xF4E842)
- message.channel.send(wEmbed);
- }
- module.exports.config = {
- name: "slots",
- aliases: [""]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement