feat: mise à jour du code

This commit is contained in:
UltraLionFr
2025-08-26 01:21:58 +02:00
parent 944845cd11
commit d3d3642ec3
29 changed files with 487 additions and 320 deletions
+15 -12
View File
@@ -1,32 +1,35 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("help")
.setDescription("Affiche la liste des commandes disponibles"),
.setName('help')
.setDescription('Affiche la liste des commandes disponibles'),
async execute(interaction, client) {
const globalCommands = await client.application.commands.fetch();
const commandList = globalCommands.map(
cmd => `</${cmd.name}:${cmd.id}> — ${cmd.description || "Pas de description"}`
).join("\n");
const commandList = globalCommands
.map(
(cmd) =>
`</${cmd.name}:${cmd.id}> — ${cmd.description || 'Pas de description'}`
)
.join('\n');
const embed = new EmbedBuilder()
.setTitle("📖 Aide du bot")
.setTitle('📖 Aide du bot')
.setDescription(
commandList.length > 0
? "Voici la liste des commandes disponibles :\n\n" + commandList
: "❌ Aucune commande trouvée."
? 'Voici la liste des commandes disponibles :\n\n' + commandList
: '❌ Aucune commande trouvée.'
)
.setColor(0x5e99ff)
.setThumbnail(client.user.displayAvatarURL())
.setFooter({
text: `QuantumCraft Studios • Demandé par ${interaction.user.tag}`,
iconURL: interaction.user.displayAvatarURL()
iconURL: interaction.user.displayAvatarURL(),
})
.setTimestamp();
await interaction.reply({ embeds: [embed], flags: 64 });
}
};
},
};
+6 -6
View File
@@ -1,11 +1,11 @@
const { SlashCommandBuilder } = require("discord.js");
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("ping")
.setDescription("Répond avec Pong !"),
.setName('ping')
.setDescription('Répond avec Pong !'),
async execute(interaction) {
await interaction.reply("🏓 Pong !");
}
};
await interaction.reply('🏓 Pong !');
},
};