From 82ca6b3b80e91c457a110d2c9ac567103fe2a559 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Mon, 26 Dec 2022 15:35:35 +0000 Subject: [PATCH] added proper 'debug' var handling in config for discord bot --- notifiers/discord.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/notifiers/discord.go b/notifiers/discord.go index 58d5509..5e620da 100644 --- a/notifiers/discord.go +++ b/notifiers/discord.go @@ -61,8 +61,13 @@ func (discord *DiscordNotifier) Open() bool { } log.Println("Authorized discord bot for:", discord.ServerChannel.Name) } + discord.Debug = viper.GetBool("notifiers.discord.debug") + if discord.Debug { + bot.LogLevel = discordgo.LogDebug + } else { + bot.LogLevel = discordgo.LogInformational + } discord.Bot = bot - bot.Debug = viper.GetBool("notifiers.discord.debug") return true }