bloaterbot/bot.go
2023-03-05 05:45:36 +01:00

27 lines
469 B
Go

package main
import (
"log"
"watn3y/bloaterbotv3/botIO"
"watn3y/bloaterbotv3/commands"
"watn3y/bloaterbotv3/text"
)
func bot() {
updates, bot := botIO.Authenticate()
for update := range updates {
if update.Message == nil {
continue
}
log.Printf("[bot] Recieved Message: [%s] %s", update.Message.From.UserName, update.Message.Text)
if update.Message.IsCommand() {
commands.Commands(update, bot)
} else {
text.Matcher(update, bot)
}
}
}