logging changes

This commit is contained in:
watn3y 2023-12-29 07:54:27 +01:00
parent be0cc403b9
commit 02c9f2af6b
14 changed files with 96 additions and 77 deletions

View file

@ -7,7 +7,6 @@ import (
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
//TODO logging
func Balonlyl(update tgbotapi.Update, bot *tgbotapi.BotAPI) {

View file

@ -15,7 +15,7 @@ import (
// TODO logging
func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
log.Debug().Str("text", update.Message.Text).Int64("chat", update.Message.Chat.ID).Msg("Starting text matcher")
log.Debug().Str("Text", update.Message.Text).Msg("Starting text matcher")
if time.Since(config.BotConfig.Shutup[update.Message.Chat.ID]) <= time.Minute*60 {
log.Debug().Str("text", update.Message.Text).Int64("chat", update.Message.Chat.ID).Msg("Aborting due to shut-up")
@ -30,7 +30,7 @@ func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
}
}
if isBalonlyl {
log.Debug().Str("text", update.Message.Text).Int64("chat", update.Message.Chat.ID).Msg("Matched Balonlyl meme")
log.Info().Str("text", update.Message.Text).Int64("chat", update.Message.Chat.ID).Msg("Matched text in message")
go balonlyl.Balonlyl(update, bot)
}