From c7d9bbff53ce1e3e5151f0732653ab5e671a3743 Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 29 Jun 2023 23:45:15 +0100 Subject: [PATCH] fix: disable presence intent on public bots --- src/client.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/client.js b/src/client.js index 77d3baa..25f43c9 100644 --- a/src/client.js +++ b/src/client.js @@ -17,14 +17,16 @@ module.exports = class Client extends FrameworkClient { constructor(config, log) { super({ intents: [ - GatewayIntentBits.DirectMessages, - GatewayIntentBits.DirectMessageReactions, - GatewayIntentBits.DirectMessageTyping, - GatewayIntentBits.MessageContent, - GatewayIntentBits.Guilds, - GatewayIntentBits.GuildMembers, - GatewayIntentBits.GuildMessages, - GatewayIntentBits.GuildPresences, + ...[ + GatewayIntentBits.DirectMessages, + GatewayIntentBits.DirectMessageReactions, + GatewayIntentBits.DirectMessageTyping, + GatewayIntentBits.MessageContent, + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMembers, + GatewayIntentBits.GuildMessages, + ], + ...(process.env.PUBLIC_BOT !== 'true' ? [GatewayIntentBits.GuildPresences] : []), ], partials: [ Partials.Channel,