This commit is contained in:
shoopea 2019-05-04 17:01:57 +08:00
parent 9806f14d61
commit 9f7e236ecd
2 changed files with 8 additions and 2 deletions

View File

@ -51,7 +51,8 @@ var (
db *sql.DB
cfg Config
cfg Config
MQCWMsgQueue chan ChatWarsMessage
)
func PrintText(m *tb.Message) {
@ -94,7 +95,11 @@ func main() {
}
go StartBot()
go MQMainReceive()
MQCWMsgQueue = make(chan ChatWarsMessage, 100)
for w := 1; w <= 3; w++ {
go MQGetMsg(w, MQCWMsgQueue)
}
fmt.Println("Started !")

1
mq.go
View File

@ -3,6 +3,7 @@ package main
import (
"encoding/json"
"log"
"strconv"
"github.com/streadway/amqp"
)