From b70c0dc63135395450946356c5f4691b9d9836bc Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Mon, 8 Jun 2020 15:39:32 +0300 Subject: [PATCH] gateway intents (3.5.2) --- package.json | 4 ++-- src/struct/client.js | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2b3b5902..b780dc93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.5.0", + "version": "3.5.2", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { @@ -46,4 +46,4 @@ "ytdl-core": "^3.1.0", "zlib-sync": "^0.1.6" } -} +} \ No newline at end of file diff --git a/src/struct/client.js b/src/struct/client.js index 14a0752b..3725690f 100644 --- a/src/struct/client.js +++ b/src/struct/client.js @@ -1,6 +1,7 @@ const { Client, - Collection + Collection, + Intents } = require("discord.js"); const admin = require("firebase-admin"); const serviceAccount = require("./config/serviceAccount.json"); @@ -8,11 +9,21 @@ const fs = require("fs"); const path = require("path"); const events = require("../events/events.js"); +const myIntents = new Intents(); +myIntents.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"], + ws: { + intents: myIntents + } }); admin.initializeApp({