Update Bot

This commit is contained in:
2026-03-15 11:58:43 +01:00
parent b67c111ffc
commit cd99275933
560 changed files with 23173 additions and 55113 deletions

View File

@@ -1,43 +1,45 @@
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js');
module.exports = {
category: 'info',
data: new SlashCommandBuilder()
.setName('embed')
.setDescription('Créer un embed personnalisé.')
.addStringOption(option =>
option.setName('title')
.setDescription('Titre de l\'embed')
.setRequired(true))
.addStringOption(option =>
option.setName('description')
.setDescription('Description de l\'embed')
.setRequired(true))
.addStringOption(option =>
option.setName('color')
.setDescription('Couleur de l\'embed (hex, ex: #FF0000)')
.setRequired(false))
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
async execute(interaction) {
const title = interaction.options.getString('title');
const description = interaction.options.getString('description');
const colorInput = interaction.options.getString('color');
category: 'info',
data: new SlashCommandBuilder()
.setName('embed')
.setDescription('Créer un embed personnalisé.')
.addStringOption(option =>
option.setName('title')
.setDescription('Titre de l\'embed')
.setRequired(true))
.addStringOption(option =>
option.setName('description')
.setDescription('Description de l\'embed')
.setRequired(true))
.addStringOption(option =>
option.setName('color')
.setDescription('Couleur de l\'embed (hex, ex: #FF0000)')
.setRequired(false))
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
async execute(interaction) {
const title = interaction.options.getString('title');
const description = interaction.options.getString('description');
const colorInput = interaction.options.getString('color');
let color = 0x5865F2;
if (colorInput) {
const hexMatch = colorInput.match(/^#?([0-9A-Fa-f]{6})$/);
if (hexMatch) {
color = parseInt(hexMatch[1], 16);
}
}
let color = 0x5865F2; // Couleur par défaut (bleu Discord)
if (colorInput) {
// Parser la couleur hex
const hexMatch = colorInput.match(/^#?([0-9A-Fa-f]{6})$/);
if (hexMatch) {
color = parseInt(hexMatch[1], 16);
}
}
const embed = new EmbedBuilder()
.setTitle(title)
.setDescription(description)
.setColor(color)
.setFooter({ text: `Créé par ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL() })
.setTimestamp();
const embed = new EmbedBuilder()
.setTitle(title)
.setDescription(description)
.setColor(color)
.setFooter({ text: `Créé par ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL() })
.setTimestamp();
await interaction.reply({ embeds: [embed] });
},
};
await interaction.reply({ embeds: [embed] });
},
};