intents, fetch all members

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-11-11 01:55:04 +01:00
parent 145edfac76
commit 9eb3005211

View file

@ -3,8 +3,12 @@ if (!fs.existsSync('./config.json')) {
throw new Error('I could not find config.json, are you sure you have it?'); throw new Error('I could not find config.json, are you sure you have it?');
} }
const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo'); const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo');
const { Intents } = require('discord.js');
const { token, prefix, ownerID } = require('./config.json'); const { token, prefix, ownerID } = require('./config.json');
let intents = new Intents(Intents.ALL);
intents.remove('GUILD_PRESENCES');
class hahaYesClient extends AkairoClient { class hahaYesClient extends AkairoClient {
constructor() { constructor() {
super({ super({
@ -17,8 +21,10 @@ class hahaYesClient extends AkairoClient {
} }
} }
}, { }, {
partials: ['MESSAGE', 'REACTION'], partials: ['MESSAGE'],
disableMentions: 'everyone', disableMentions: 'everyone',
ws: { intents: intents },
fetchAllMembers: true
}); });
this.commandHandler = new CommandHandler(this, { this.commandHandler = new CommandHandler(this, {