This commit is contained in:
shoopea 2019-06-10 17:14:03 +08:00
parent b53e71d998
commit 33b17a705c
2 changed files with 3 additions and 2 deletions

2
bot.go
View File

@ -300,7 +300,7 @@ func botMsgLoad(m *tb.Message) {
} }
TGCmdQueue <- c TGCmdQueue <- c
err := UnzipMessages(buf.Bytes()) err = UnzipMessages(buf.Bytes())
logOnError(err, "botMsgLoad : UnzipMessages") logOnError(err, "botMsgLoad : UnzipMessages")
c = TGCommand{ c = TGCommand{

View File

@ -6,6 +6,7 @@ import (
"log" "log"
"math/rand" "math/rand"
"strconv" "strconv"
"strings"
"time" "time"
"github.com/streadway/amqp" "github.com/streadway/amqp"
@ -249,7 +250,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
j, err := json.Marshal(c) j, err := json.Marshal(c)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : Marshal(c)") logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : Marshal(c)")
log.Printf("TGCmdWorker["+strconv.Itoa(id)+"] : new command.\n%s\n", string(j)) log.Printf("TGCmdWorker["+strconv.Itoa(id)+"] : new command.\n%s\n", string(j))
opt := SendOptions{} opt := tb.SendOptions{}
switch c.ParseMode { switch c.ParseMode {
case cmdParseModePlain: case cmdParseModePlain:
opt.ParseMode = tb.ModeDefault opt.ParseMode = tb.ModeDefault