mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 15:07:26 +02:00
9bd39c69ca
sinon il y a pleins de truc comme les anti raid , des coorectif ect
30 lines
1.0 KiB
JavaScript
30 lines
1.0 KiB
JavaScript
const { EmbedBuilder } = require('discord.js');
|
|
|
|
module.exports = {
|
|
name: 'baninfo',
|
|
description: 'Affiche les informations d\'un utilisateur bannie',
|
|
emote: '🚫',
|
|
utilisation: 'baninfo [id]',
|
|
category: 'gestion',
|
|
|
|
async execute(message, args, client) {
|
|
const userIdToCheck = args[0];
|
|
const bans = await message.guild.bans.fetch();
|
|
|
|
const ban = bans.find(ban => ban.user.id === userIdToCheck);
|
|
|
|
if (!ban) {
|
|
return message.reply('Cet utilisateur n\'est pas dans la liste des bannis.');
|
|
}
|
|
const banner = ban.executor;
|
|
const reason = ban.reason || 'Raison non disponible';
|
|
const banDate = ban.createdAt;
|
|
|
|
const embed = new EmbedBuilder()
|
|
.setTitle(`Informations sur l'utilisateur ${ban.user.tag}`)
|
|
.setDescription(`**Raison: **\`${reason}\`\n**Bannie par: **${banner ? banner.tag : 'Inconnu'}\n**Date: **${banDate}`)
|
|
.setColor('#0099ff');
|
|
|
|
message.channel.send({ embeds: [embed] });
|
|
},
|
|
}; |