30 lines
450 B
Go
30 lines
450 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
"watn3y/bloaterbotv3/botIO"
|
|
"watn3y/bloaterbotv3/commands"
|
|
"watn3y/bloaterbotv3/text"
|
|
)
|
|
|
|
var shutuptime time.Time
|
|
|
|
func bot() {
|
|
updates, bot := botIO.Authenticate()
|
|
|
|
for update := range updates {
|
|
if update.Message == nil {
|
|
continue
|
|
}
|
|
|
|
if update.Message.IsCommand() {
|
|
commands.Commands(update, bot)
|
|
} else {
|
|
if time.Since(shutuptime).Minutes() >= 60 {
|
|
text.Matcher(update, bot)
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|