added proper 'debug' var handling in config for discord bot
This commit is contained in:
parent
04d4494c69
commit
82ca6b3b80
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue