Migrate user avatar update notifications

This commit is contained in:
2023-11-07 18:25:04 +01:00
parent 45e2f42bcf
commit c32fb9c793
3 changed files with 43 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ const path = require('node:path');
const { Client, Collection, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages] });
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences] });
client.commands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
@@ -32,6 +32,7 @@ for (const file of eventFiles) {
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
console.log(`Registered event ${event.name} ${file}`);
client.on(event.name, (...args) => event.execute(...args));
}
}