mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-25 14:17:20 +02:00
Update roll (le return ne fonctionnais pas dans la fonction embedColor)
This commit is contained in:
+15
-9
@@ -19,8 +19,9 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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])) {
|
} else if (isNaN(args[0])) {
|
||||||
embedColor(message.author.id, message.guild.id).then(color => {
|
embedColor(message.author.id, message.guild.id).then(color => {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
@@ -30,8 +31,9 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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) {
|
} else if (args[0] < 25) {
|
||||||
embedColor(message.author.id, message.guild.id).then(color => {
|
embedColor(message.author.id, message.guild.id).then(color => {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
@@ -41,8 +43,9 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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') {
|
} 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 => {
|
embedColor(message.author.id, message.guild.id).then(color => {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
@@ -52,8 +55,9 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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) => {
|
const pocket = await new Promise((resolve, reject) => {
|
||||||
@@ -70,7 +74,7 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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 {
|
} else {
|
||||||
resolve(row.pocket);
|
resolve(row.pocket);
|
||||||
@@ -109,7 +113,7 @@ module.exports = {
|
|||||||
} else if ((args[1] === 'vert' || args[1] === 'green') && colorR === 'vert') {
|
} else if ((args[1] === 'vert' || args[1] === 'green') && colorR === 'vert') {
|
||||||
gain = args[0] * 36;
|
gain = args[0] * 36;
|
||||||
} else {
|
} else {
|
||||||
gain = 0-args[0];
|
gain = 0 - args[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
@@ -131,19 +135,21 @@ module.exports = {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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 {
|
} else {
|
||||||
embedColor(message.author.id, message.guild.id).then(color => {
|
embedColor(message.author.id, message.guild.id).then(color => {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle('🎲 Roulette')
|
.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)
|
.setColor(color)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
.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