Add an even more debug option (discord) (#1368)

Enable discordgo debugging with debuglevel=1 under the [discord.xxx] section, for even more debugging fun.
This commit is contained in:
Wim 2021-01-23 00:09:56 +01:00 committed by GitHub
parent 4ac6366706
commit 5dd15ef8e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,6 +148,11 @@ func (b *Bdiscord) Connect() error {
return fmt.Errorf("use of removed WebhookURL setting")
}
if b.GetInt("debuglevel") > 0 {
b.Log.Debug("enabling even more discord debug")
b.c.Debug = true
}
// Initialise webhook management
b.transmitter = transmitter.New(b.c, b.guildID, "matterbridge", b.useAutoWebhooks)
b.transmitter.Log = b.Log