diff --git a/commands/jeux/roll.js b/commands/jeux/roll.js index d9c5ec5..601329d 100644 --- a/commands/jeux/roll.js +++ b/commands/jeux/roll.js @@ -25,7 +25,7 @@ module.exports = { } else { mise = args[0] } - + if (args.length !== 2) { embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() @@ -76,6 +76,20 @@ module.exports = { return } + if (pocket < mise) { + embedColor(message.author.id, message.guild.id).then(color => { + const embed = new EmbedBuilder() + .setTitle('🎲 Roulette') + .setDescription(`Vous n'avez pas assez d'argent sur vous pour miser cette somme.`) + .setColor(color) + .setTimestamp() + .setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() }) + + message.reply({ embeds: [embed], allowedMentions: { repliedUser: false } }) + }); + return + } + embedColor(message.author.id, message.guild.id).then(color => { const embed = new EmbedBuilder() .setTitle('🎲 Roulette')