diff --git a/commands/teams/team.js b/commands/teams/team.js index 1290370..fc58f53 100644 --- a/commands/teams/team.js +++ b/commands/teams/team.js @@ -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() });