From 406031f148b60e1862d2b64b6d1cdff90fb7f0c6 Mon Sep 17 00:00:00 2001 From: pongo1231 Date: Sun, 27 Aug 2023 19:08:34 +0000 Subject: [PATCH] TwitchChatVotingProxy: Remove redundant GatewayIntents from discord client & add clarification --- .../VotingReceiver/DiscordVotingReceiver.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TwitchChatVotingProxy/VotingReceiver/DiscordVotingReceiver.cs b/TwitchChatVotingProxy/VotingReceiver/DiscordVotingReceiver.cs index 91e39a589..307649084 100644 --- a/TwitchChatVotingProxy/VotingReceiver/DiscordVotingReceiver.cs +++ b/TwitchChatVotingProxy/VotingReceiver/DiscordVotingReceiver.cs @@ -12,8 +12,6 @@ namespace TwitchChatVotingProxy.VotingReceiver /// class DiscordVotingReceiver : IVotingReceiver { - public static readonly int RECONNECT_INTERVAL = 1000; - public event EventHandler OnMessage; private string m_BotToken; @@ -45,7 +43,13 @@ public async Task Init() return false; } - m_Client = new DiscordSocketClient(); + m_Client = new DiscordSocketClient(new DiscordSocketConfig() + { + // We don't actually need any but the Ready event fires much later without this for whatever reason + // So we just enable all unprivileged intents minus the ones the log warns us against using + GatewayIntents = GatewayIntents.AllUnprivileged + & ~(GatewayIntents.GuildScheduledEvents | GatewayIntents.GuildInvites) + }); m_Client.Log += OnLog; m_Client.Ready += OnReady;