test
This commit is contained in:
parent
6a4cf19a0f
commit
c20116fa44
5
td.go
5
td.go
@ -138,8 +138,13 @@ func getHistory(c *tdlib.Client) {
|
||||
for lastMsgID64 >= 0 {
|
||||
msgs, err := c.GetChatHistory(user_chtwrsbot, lastMsgID64, 0, 50, false)
|
||||
if err != nil {
|
||||
if err.Error() == "timeout" {
|
||||
logOnError(err, "Waiting...")
|
||||
fmt.Printf("Waiting (%d messages retrieved).\n", msgCount)
|
||||
} else {
|
||||
logOnError(err, "Cannot get history")
|
||||
lastMsgID64 = -1
|
||||
}
|
||||
} else {
|
||||
for _, msg := range msgs.Messages {
|
||||
switch msg.Content.GetMessageContentEnum() {
|
||||
|
Loading…
Reference in New Issue
Block a user