diff --git a/commands/Alliance/Adep.js b/commands/Alliance/Adep.js index 146ef6b..6f6ddf3 100644 --- a/commands/Alliance/Adep.js +++ b/commands/Alliance/Adep.js @@ -97,8 +97,8 @@ module.exports = { const alliance = await new Promise((resolve, reject) => { db.get( - `SELECT * FROM alliances WHERE guildId = ? AND id = (SELECT alliancesId FROM team WHERE guildId = ? AND id = (SELECT teamId FROM users WHERE guildId = ? AND userId = ?))`, - [message.guild.id, message.guild.id, message.author.id], + `SELECT * FROM alliances WHERE guildId = ? AND id = (SELECT alliancesId FROM teams WHERE guildId = ? AND id = (SELECT teamId FROM users WHERE guildId = ? AND userId = ?))`, + [message.guild.id, message.guild.id, message.guild.id, message.author.id], (err, row) => { if (err) reject(err); resolve(row); diff --git a/commands/Alliance/Arep.js b/commands/Alliance/Arep.js index 481cc2b..38d3698 100644 --- a/commands/Alliance/Arep.js +++ b/commands/Alliance/Arep.js @@ -105,7 +105,7 @@ module.exports = { const embed = new EmbedBuilder() .setTitle("Ajout de reputation effectué") .setDescription( - "💰 Vous avez ajouter `1` reputation à l`alliance `" + args[0] + "`.", + "💰 Vous avez ajouter `1` reputation à l'alliance `" + args[0] + "`.", ) .setColor(await embedColor(message.author.id, message.guild.id)) .setTimestamp() diff --git a/commands/Alliance/Awithdraw.js b/commands/Alliance/Awithdraw.js index 47dcebe..89bd333 100644 --- a/commands/Alliance/Awithdraw.js +++ b/commands/Alliance/Awithdraw.js @@ -18,7 +18,7 @@ module.exports = { permission: 0, async execute(message, args, client) { - if (args.length == 0) { + if (args.length !== 2) { const embed = new EmbedBuilder() .setTitle("Récuperation Impossible") .setDescription( @@ -70,8 +70,8 @@ module.exports = { } const alliance = await new Promise((resolve, reject) => { db.get( - `SELECT * FROM alliances WHERE guildId = ? AND id = (SELECT alliancesId FROM team WHERE guildId = ? AND id = (SELECT teamId FROM users WHERE guildId = ? AND userId = ?))`, - [message.guild.id, message.guild.id, message.author.id], + `SELECT * FROM alliances WHERE guildId = ? AND id = (SELECT alliancesId FROM teams WHERE guildId = ? AND id = (SELECT teamId FROM users WHERE guildId = ? AND userId = ?))`, + [message.guild.id, message.guild.id, message.guild.id, message.author.id], (err, row) => { if (err) reject(err); resolve(row); diff --git a/commands/Alliance/alliance.js b/commands/Alliance/alliance.js index ffa7079..1c21f41 100644 --- a/commands/Alliance/alliance.js +++ b/commands/Alliance/alliance.js @@ -66,7 +66,7 @@ module.exports = { const embed = new EmbedBuilder() .setTitle("🛡️ Informations de `" + alliance.name + "`:") .setDescription( - `**Id:** \`${alliance.id}\`\n**Description:** \`${alliance.description}\`\n**Banque:** \`${alliance.bank}\`coins => Tout le monde peux recupéré ces coins.\n**Reputation:** \`${alliance.reputation} => Tout le monde peux recupéré ces reputations\`\n\n**Membres (\`${memberlist.length}\`):**\n${memberlist.map((member) => `**${member.allianceRole}:** <@${member.userId}>`).join("\n")}\n`, + `**Id:** \`${alliance.id}\`\n**Description:** \`${alliance.description}\`\n**Banque:** \`${alliance.bank}\`coins => Tout le monde peux recupéré ces coins.\n**Reputation:** \`${alliance.reputation}\` => Tout le monde peux recupéré ces reputations\n\n**Membres (\`${memberlist.length}\`):**\n${memberlist.map((alliances) => `> __**${alliances.name}**__`).join("\n")}\n`, ) .setColor(await embedColor(message.author.id, message.guild.id)) .setTimestamp() diff --git a/commands/achats/tshop.js b/commands/achats/tshop.js index d11e24d..119f565 100644 --- a/commands/achats/tshop.js +++ b/commands/achats/tshop.js @@ -146,7 +146,7 @@ module.exports = { win = "2500"; } - if (user.teamRole !== "officier" || user.teamRole !== "officer") + if (user.teamRole !== "officier" || user.teamRole !== "owner") return interaction.reply({ content: "Vous n'avez pas les permissions pour faire cet achat", ephemeral: true,