mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
Add traces for automessage disable
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
14dbc832d7
commit
ece2964c9a
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,9 @@ func (a *autoMessage) CanSend() bool {
|
|||
}
|
||||
|
||||
if !a.allowExecuteDisableOnTemplate() {
|
||||
log.Trace("Auto-Message disabled by template")
|
||||
// Reset the timer for this execution not to spam every second
|
||||
a.lastMessageSent = time.Now()
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -154,6 +157,7 @@ func (a *autoMessage) allowExecuteDisableOnTemplate() bool {
|
|||
"channel": a.Channel,
|
||||
})
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Error in auto-message disable template")
|
||||
// Caused an error, forbid execution
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue