test
This commit is contained in:
parent
1a9fe28549
commit
837cbae8eb
4
td.go
4
td.go
@ -21,7 +21,7 @@ func ListenMe(c *tdlib.Client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
receiver := c.AddEventReceiver(&tdlib.UpdateNewMessage{}, eventFilter, 100)
|
receiver := c.AddEventReceiver(&tdlib.UpdateNewMessage{}, eventFilter, 100)
|
||||||
for newMsg := range receiver.Chan {
|
for _ := range receiver.Chan {
|
||||||
lastOwnTDMsg = time.Now()
|
lastOwnTDMsg = time.Now()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ func ListenMQ(c *tdlib.Client, msgs <-chan ChatWarsCommand) {
|
|||||||
time.Sleep(time.Until(lastOwnTDMsg.Add(time.Second)))
|
time.Sleep(time.Until(lastOwnTDMsg.Add(time.Second)))
|
||||||
now = time.Now()
|
now = time.Now()
|
||||||
}
|
}
|
||||||
log.Printf("ListenMQ : Consuming msg\n")
|
log.Printf("ListenMQ : Consuming msg %d\n", m.Type)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user