test
This commit is contained in:
parent
b53e71d998
commit
33b17a705c
2
bot.go
2
bot.go
@ -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{
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user