mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-10 19:04:15 +02:00
Update alliance
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user