mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-16 23:57:48 +02:00
grand commit que tutur attend ( marche pas le raidmode en dev)
sinon il y a pleins de truc comme les anti raid , des coorectif ect
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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] });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user