This commit is contained in:
shoopea 2019-05-11 11:36:17 +08:00
parent f187c00399
commit 1717ffcb6c
2 changed files with 6 additions and 2 deletions

2
bot.go
View File

@ -8,7 +8,7 @@ import (
"time" "time"
) )
func BotHandlers(b *tb.Bot) { func BotHandlers() {
b.Handle("/hello", func(m *tb.Message) { b.Handle("/hello", func(m *tb.Message) {
s, err := botHello(m) s, err := botHello(m)
logOnError(err, "/hello") logOnError(err, "/hello")

View File

@ -94,7 +94,11 @@ func main() {
failOnError(err, "Registering bot") failOnError(err, "Registering bot")
log.Println("Bot registered") log.Println("Bot registered")
go BotHandlers(b) go BotHandlers()
u := tb.User{
ID: cfg.Bot.Admin,
}
b.Send(&u, "Bot restarted")
MQCWMsgQueue = make(chan ChatWarsMessage, 100) MQCWMsgQueue = make(chan ChatWarsMessage, 100)
SQLMsgIdentifyQueue = make(chan int64, 100) SQLMsgIdentifyQueue = make(chan int64, 100)