66 lines
2.0 KiB
JavaScript
66 lines
2.0 KiB
JavaScript
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
|
const { formatUptime } = require('../../utils/helpers');
|
|
|
|
module.exports = {
|
|
category: 'info',
|
|
data: new SlashCommandBuilder()
|
|
.setName('info')
|
|
.setDescription('Obtenir les informations du bot'),
|
|
async execute(interaction) {
|
|
const { colors, emojis } = require('../../utils/constants');
|
|
const uptime = formatUptime(process.uptime());
|
|
|
|
const embed = new EmbedBuilder()
|
|
.setAuthor({
|
|
name: `${interaction.client.user.username}`,
|
|
iconURL: interaction.client.user.displayAvatarURL()
|
|
})
|
|
.setTitle('📝 Informations du Bot')
|
|
.setColor(colors.info)
|
|
.setThumbnail(interaction.client.user.displayAvatarURL({ dynamic: true, size: 256 }))
|
|
.addFields(
|
|
{
|
|
name: '👩💻 Développeuse Principale',
|
|
value: '<@361526553940721684>',
|
|
inline: true
|
|
},
|
|
{
|
|
name: '🧠 Langages et environnement',
|
|
value: [
|
|
'• **Langage :** <:JavaScript:1425179797692092506> JavaScript (ECMAScript 2024)',
|
|
'• **Backend :** <:NodeJS:1425179878252089435> Node.js v22.21.0',
|
|
'• **Librairies :** <:DiscordJS:1425179852536938670> Discord.js v14.22.1',
|
|
'• **IDE :** <:WebStorm:1429190717066055841> JetBrains WebStorm 2025.2.3',
|
|
].join('\n'),
|
|
inline: false
|
|
},
|
|
{
|
|
name: '💡 Date de création',
|
|
value: '20 Août 2025',
|
|
inline: true
|
|
},
|
|
{
|
|
name: '⏱️ Uptime',
|
|
value: uptime,
|
|
inline: true
|
|
},
|
|
{
|
|
name: '📊 Statistiques',
|
|
value: [
|
|
`• **Serveurs :** ${interaction.client.guilds.cache.size}`,
|
|
`• **Utilisateurs :** ${interaction.client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)}`,
|
|
`• **Commandes :** ${interaction.client.commands.size}`,
|
|
].join('\n'),
|
|
inline: false
|
|
}
|
|
)
|
|
.setFooter({
|
|
text: `${interaction.guild.name} • Made with love by Syxpi 💞`,
|
|
iconURL: interaction.client.user.displayAvatarURL()
|
|
})
|
|
.setTimestamp();
|
|
|
|
await interaction.reply({ embeds: [embed] });
|
|
},
|
|
};
|