diff --git a/commands/jeux/roll.js b/commands/jeux/roll.js index 839c146..e12ae96 100644 --- a/commands/jeux/roll.js +++ b/commands/jeux/roll.js @@ -5,7 +5,7 @@ const db = require('../../fonctions/database.js'); module.exports = { aliases: ['roulette'], description: 'Lance une roulette.', - emote: '🎲', + emote: '🎲', utilisation: ' ', permission: 0, @@ -18,9 +18,10 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) - }); + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + }); + return } else if (isNaN(args[0])) { embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() @@ -29,9 +30,10 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) - }); + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + }); + return } else if (args[0] < 25) { embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() @@ -40,9 +42,10 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) }); + return } else if (args[1] !== 'rouge' && args[1] !== 'noir' && args[1] !== 'vert' && args[1] !== 'red' && args[1] !== 'black' && args[1] !== 'green') { embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() @@ -51,9 +54,10 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) - }); + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + }); + return } const pocket = await new Promise((resolve, reject) => { @@ -69,9 +73,9 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) - }); + + return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + }); } else { resolve(row.pocket); } @@ -87,7 +91,7 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - + return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) }); @@ -109,7 +113,7 @@ module.exports = { } else if ((args[1] === 'vert' || args[1] === 'green') && colorR === 'vert') { gain = args[0] * 36; } else { - gain = 0-args[0]; + gain = 0 - args[0]; } await new Promise((resolve, reject) => { @@ -130,20 +134,22 @@ module.exports = { .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) }); + return } else { embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() .setTitle('🎲 Roulette') - .setDescription(`Vous avez misé \`${args[0]}\` sur \`${args[1]}\` et la bille est tombée sur \`${colorR}\`. Vous avez perdu \`${0-gain}\` !`) + .setDescription(`Vous avez misé \`${args[0]}\` sur \`${args[1]}\` et la bille est tombée sur \`${colorR}\`. Vous avez perdu \`${0 - gain}\` !`) .setColor(color) .setTimestamp() .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) - - return message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) }); + return } } }; \ No newline at end of file