package main import ( "time" "github.com/rs/zerolog/log" "watn3y.de/bloaterbot/botIO" "watn3y.de/bloaterbot/commands" "watn3y.de/bloaterbot/commands/notify" "watn3y.de/bloaterbot/inline/nenefoot" "watn3y.de/bloaterbot/text" ) func bot() { updates, bot := botIO.Authenticate() go notify.NotifyHandler(bot) for update := range updates { log.Debug().Interface("update", update).Msg("Recieved update") if update.InlineQuery != nil && update.Message == nil { nenefoot.Nenefoot(update, bot) continue } if update.Message != nil { if update.Message.Time().UTC().Unix() < time.Now().UTC().Unix() { continue } if update.Message.IsCommand() { commands.Commands(update, bot) } else { text.Matcher(update, bot) continue } } log.Info().Interface("update", update).Msg("Unable to parse update") } }