Initial support for Discord gateway intents

This commit is contained in:
Christer Warén 2020-08-22 20:19:09 +03:00
parent 7bef1142d5
commit 960b98e177

View File

@ -5,11 +5,21 @@ const path = require('path');
const events = './events/'; const events = './events/';
const Datastore = require('./datastore.js'); const Datastore = require('./datastore.js');
const GatewayIntents = new Discord.Intents();
GatewayIntents.add(
1 << 0, // GUILDS
1 << 7, // GUILD_VOICE_STATES
1 << 9 // GUILD_MESSAGES
);
module.exports = class extends Client { module.exports = class extends Client {
constructor() { constructor() {
super({ super({
disableEveryone: true, disableEveryone: true,
disabledEvents: ['TYPING_START'] disabledEvents: ['TYPING_START'],
ws: {
intents: GatewayIntents
}
}); });
this.commands = new Collection(); this.commands = new Collection();
this.commandAliases = new Collection(); this.commandAliases = new Collection();