This commit is contained in:
shoopea 2019-12-29 18:55:31 +08:00
parent 89ebfb6358
commit d09f778522

2
bot.go
View File

@ -102,6 +102,7 @@ func botText(m *tb.Message) {
PrintText(m) PrintText(m)
if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && int64(m.OriginalSender.ID) == chtwrsbotID64 { if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && int64(m.OriginalSender.ID) == chtwrsbotID64 {
log.Printf("botText : forwarding message.\n")
cwm := ChatWarsMessage{ cwm := ChatWarsMessage{
TGUserID64: int64(m.Sender.ID), TGUserID64: int64(m.Sender.ID),
TGSenderUserID64: chtwrsbotID64, TGSenderUserID64: chtwrsbotID64,
@ -114,6 +115,7 @@ func botText(m *tb.Message) {
MQCWMsgQueue <- cwm MQCWMsgQueue <- cwm
} else { } else {
log.Printf("botText : printing message.\n")
b, _ := json.Marshal(m) b, _ := json.Marshal(m)
log.Printf("botText : %s\n", string(b)) log.Printf("botText : %s\n", string(b))
} }