update deposit chat

This commit is contained in:
shoopea 2020-02-01 20:44:46 +08:00
parent 29fdfc0640
commit ccd227bc30

13
bot.go
View File

@ -107,7 +107,18 @@ func botQuery(q *tb.Query) {
func botText(m *tb.Message) {
PrintText(m)
if m.IsForwarded() && m.OriginalSender != nil && int64(m.OriginalSender.ID) == chtwrsbotID64 {
if m.Chat.ID == cfg.Bot.Depositchat && m.IsForwarded() && m.OriginalSender != nil && int64(m.OriginalSender.ID) == chtwrsbotID64 {
cwm := ChatWarsMessage{
TGUserID64: int64(bot.Me.ID),
TGSenderUserID64: int64(m.Sender.ID),
ID64: int64(m.ID),
ChatID64: int64(m.Chat.ID),
Text: m.Text,
Date: m.Time().UTC(),
IsForwarded: true,
}
MQCWMsgQueue <- cwm
} else if m.IsForwarded() && m.OriginalSender != nil && int64(m.OriginalSender.ID) == chtwrsbotID64 {
cwm := ChatWarsMessage{
TGUserID64: int64(m.Sender.ID),
TGSenderUserID64: chtwrsbotID64,