From 9bf9e06dbff1b49de1526f03dfc554129e05bab8 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 24 Mar 2022 20:09:27 +0100 Subject: [PATCH] Gateway errors should no longer be logged on selfhost version --- src/NadekoBot/Bot.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Bot.cs b/src/NadekoBot/Bot.cs index d00aa211c..4f141bb1d 100644 --- a/src/NadekoBot/Bot.cs +++ b/src/NadekoBot/Bot.cs @@ -364,12 +364,15 @@ Read this only if your bot is in 100 or more servers: You'll need to apply to use the intents with Discord, but for small selfhosts, all that is required is enabling the intents in the developer portal. Yes, this is a new thing from Discord, as of October 2020. No, there's nothing we can do about it. Yes, we're aware it worked before. While waiting for your bot to be accepted, you can change the 'usePrivilegedIntents' inside your creds.yml to 'false', although this will break many of the nadeko's features"); + return Task.CompletedTask; } - else if (arg.Exception is not null) + +#if GLOBAL_NADEKO || DEBUG + if (arg.Exception is not null) Log.Warning(arg.Exception, "{ErrorSource} | {ErrorMessage}", arg.Source, arg.Message); else Log.Warning("{ErrorSource} | {ErrorMessage}", arg.Source, arg.Message); - +#endif return Task.CompletedTask; }