modif afficha 🔐 + ajout \n + ajout de noms ('tinfo', 'teaminfo')

This commit is contained in:
*x1
2024-05-26 23:28:28 +02:00
parent 75135973f4
commit e9e97b3177
+18 -2
View File
@@ -3,7 +3,7 @@ const db = require('../../fonctions/database.js');
const embedColor = require('../../fonctions/embedColor.js');
module.exports = {
aliases: ['t'],
aliases: ['t', 'tinfo', 'teaminfo'],
description: 'Affiche les informations de votre team.',
emote: '🛡️',
utilisation: '',
@@ -33,10 +33,26 @@ module.exports = {
resolve(rows);
});
});
let CadenaS = ":unlock:"
if (team.padlock == 5) {
CadenaS = ":lock::lock::lock::lock::lock:"
}
if (team.padlock == 4) {
CadenaS = ":lock::lock::lock::lock:"
}
if (team.padlock == 3) {
CadenaS = ":lock::lock::lock:"
}
if (team.padlock == 2) {
CadenaS = ":lock::lock:"
}
if (team.padlock == 1) {
CadenaS = ":lock:"
}
const embed = new EmbedBuilder()
.setTitle('🛡️ Informations de team')
.setDescription(`**Nom:** ${team.name}\n**Description:** ${team.description}\n**Banque:** ${team.bank} coins\n**Niveau:** ${team.level}\n**Soldats:** ${team.soldiers}\n**Soldats blessés:** ${team.woundedSoldiers}\n**Niveau du camp:** ${team.campLevel}\n**Tourelles:** ${team.turrets}\n**Cadenas:** ${team.padlock}\n**Membres (${memberlist.length}):**\n${memberlist.map(member => `<@${member.userId}> : ${member.teamRole}`).join('\n')}`)
.setDescription(`**Nom:** ${team.name}\n**Description:** ${team.description}\n**Banque:** ${team.bank} coins\n**Niveau:** ${team.level}\n\n**Soldats:** ${team.soldiers}\n**Soldats blessés:** ${team.woundedSoldiers}\n**Niveau du camp:** ${team.campLevel}\n**Tourelles:** ${team.turrets}\n**Cadenas:** ${CadenaS}\n\n**Membres (${memberlist.length}):**\n${memberlist.map(member => `**${member.teamRole} :** <@${member.userId}>`).join('\n')}`)
.setColor(await embedColor(message.author.id, message.guild.id))
.setTimestamp()
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() });