refactor: Standardized logging to be more uniform

This commit is contained in:
Noah 2025-08-31 03:51:36 +02:00
parent 99a81a201b
commit 38db97bdcf
No known key found for this signature in database
GPG key ID: D2A7E2C8F77E0430
8 changed files with 28 additions and 28 deletions

6
bot.go
View file

@ -18,10 +18,10 @@ func bot() {
go steam.StartWatchers(bot)
for update := range updates {
log.Debug().Interface("update", update).Msg("Received update")
log.Debug().Interface("update", update).Msg("Update received")
if update.Message == nil || update.Message.Text == "" {
log.Debug().Int("UpdateID", update.UpdateID).Msg("Unable to parse update")
log.Debug().Int("UpdateID", update.UpdateID).Msg("Failed to parse update")
continue
}
if update.Message.Time().UTC().Unix() < time.Now().UTC().Unix() {
@ -30,7 +30,7 @@ func bot() {
}
if update.Message.IsCommand() {
log.Info().Int64("ChatID", update.Message.Chat.ID).Int64("UserID", update.Message.From.ID).Str("Text", update.Message.Text).Msg("Received Command")
log.Info().Int64("ChatID", update.Message.Chat.ID).Int64("UserID", update.Message.From.ID).Str("Text", update.Message.Text).Msg("Command received")
commands.Commands(update, bot)
}
}