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:
VALOU3336
2024-04-22 18:30:33 +02:00
parent d8912855ff
commit 9bd39c69ca
178 changed files with 9241 additions and 480 deletions
+19 -3
View File
@@ -1,5 +1,5 @@
const { EmbedBuilder } = require('discord.js');
const fetch = require('node-fetch');
module.exports = {
name: 'botconfig',
description: 'Affiche la configuration du bot',
@@ -11,8 +11,23 @@ module.exports = {
async execute(message, args, client) {
const bot = client.user;
const presenceStatus = bot.presence.status;
let presenceEmoji = '';
const axios = require('axios');
const response = await fetch(`https://discord.com/api/users/${bot.id}`, {
method: 'GET',
headers: {
Authorization: `Bot ${message.client.token}`
}
});
const data = await response.json();
if (!data.banner) {
return message.reply('Cet utilisateur n\'a pas de bannière.');
}
const format = data.banner.startsWith('a_') ? 'gif' : 'png';
const bannerURL = `https://cdn.discordapp.com/banners/${bot.id}/${data.banner}.${format}?size=2048`;
let presenceEmoji = '';
switch (presenceStatus) {
case 'online':
presenceEmoji = '🟢';
@@ -36,6 +51,7 @@ module.exports = {
{ name: 'Nom du bot', value: bot.username || 'Inconnu' },
{ name: 'ID du bot', value: bot.id || 'Inconnu'},
{ name: ' ', value: `[URL du profil](${bot.displayAvatarURL({ dynamic: true })})`},
{ name: ' ', value: `[URL de la banniere](${bannerURL})`},
{ name: 'Présence', value: `${presenceEmoji}`},
{ name: 'Statut', value: bot.presence.activities[0] && bot.presence.activities[0].state ? bot.presence.activities[0].state : 'Aucun statut'}
)