From e5f4fa0a6518be88cd4e8de4b4c082014e6b9db2 Mon Sep 17 00:00:00 2001 From: UltraLion <49597041+UltraLionfr@users.noreply.github.com> Date: Sat, 19 Jul 2025 05:02:02 +0200 Subject: [PATCH] Delete update-avatar.js --- update-avatar.js | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 update-avatar.js diff --git a/update-avatar.js b/update-avatar.js deleted file mode 100644 index 9a94034..0000000 --- a/update-avatar.js +++ /dev/null @@ -1,26 +0,0 @@ -require('dotenv').config(); -const { Client, GatewayIntentBits } = require('discord.js'); -const fs = require('fs'); -const path = require('path'); -const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] }); - - -const TOKEN = process.env.TOKEN; -const AVATAR_PATH = path.join(__dirname, 'assets', 'avatar.gif'); - -client.once('ready', async () => { - - try { - // Read GIF file - const avatar = fs.readFileSync(AVATAR_PATH); - - // Set the avatar - await client.user.setAvatar(avatar); - console.log('Bot avatar successfully updated!'); - } catch (error) { - console.error('Erreur de Discord :', error.response?.data || error); - console.error('Error updating bot avatar:', error); - } -}); - -client.login(TOKEN); \ No newline at end of file