From 960b98e177a0e9b1166d7deaf5fb3b31a9d0cf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 22 Aug 2020 20:19:09 +0300 Subject: [PATCH] Initial support for Discord gateway intents --- client/class.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/class.js b/client/class.js index e7091bb..d291d04 100644 --- a/client/class.js +++ b/client/class.js @@ -5,11 +5,21 @@ const path = require('path'); const events = './events/'; 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 { constructor() { super({ disableEveryone: true, - disabledEvents: ['TYPING_START'] + disabledEvents: ['TYPING_START'], + ws: { + intents: GatewayIntents + } }); this.commands = new Collection(); this.commandAliases = new Collection();