mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-03 23:36:29 +02:00
Update roll (le return ne fonctionnais pas dans la fonction embedColor)
This commit is contained in:
+14
-8
@@ -19,8 +19,9 @@ module.exports = {
|
||||
.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()
|
||||
@@ -30,8 +31,9 @@ module.exports = {
|
||||
.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()
|
||||
@@ -41,8 +43,9 @@ module.exports = {
|
||||
.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()
|
||||
@@ -52,8 +55,9 @@ module.exports = {
|
||||
.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) => {
|
||||
@@ -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) => {
|
||||
@@ -131,19 +135,21 @@ module.exports = {
|
||||
.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
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user