test
This commit is contained in:
parent
f783985926
commit
a87dc5e7f3
13
bot.go
13
bot.go
@ -106,7 +106,7 @@ func botQuery(q *tb.Query) {
|
||||
func botText(m *tb.Message) {
|
||||
PrintText(m)
|
||||
|
||||
if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && m.IsForwarded() && int64(m.OriginalSender.ID) == chtwrsbotID64 {
|
||||
if m.IsForwarded() && int64(m.OriginalSender.ID) == chtwrsbotID64 {
|
||||
cwm := ChatWarsMessage{
|
||||
TGUserID64: int64(m.Sender.ID),
|
||||
TGSenderUserID64: chtwrsbotID64,
|
||||
@ -117,6 +117,17 @@ func botText(m *tb.Message) {
|
||||
IsForwarded: true,
|
||||
}
|
||||
MQCWMsgQueue <- cwm
|
||||
} else if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && !m.IsForwarded() {
|
||||
cwm := ChatWarsMessage{
|
||||
TGUserID64: int64(m.Sender.ID),
|
||||
TGSenderUserID64: int64(m.Sender.ID),
|
||||
ID64: int64(m.ID),
|
||||
ChatID64: int64(m.Chat.ID),
|
||||
Text: m.Text,
|
||||
Date: m.Time().UTC(),
|
||||
IsForwarded: false,
|
||||
}
|
||||
MQCWMsgQueue <- cwm
|
||||
}
|
||||
// all the text messages that weren't
|
||||
// captured by existing handlers
|
||||
|
Loading…
Reference in New Issue
Block a user