Update Bot (j'ai plus le repo sur GitHub)

Qui c'est la conne qui a delete le repo sur GitHub? C'EST MOIIIII
This commit is contained in:
2026-02-09 14:36:26 +01:00
parent eab4419e12
commit ad2014b7b2
586 changed files with 58986 additions and 25205 deletions

43
commands/info/embed.js Normal file
View File

@@ -0,0 +1,43 @@
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');
let color = 0x5865F2;
if (colorInput) {
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();
await interaction.reply({ embeds: [embed] });
},
};