fix delay
This commit is contained in:
parent
97619d1a45
commit
fdf3d4e0dd
4
td.go
4
td.go
@ -224,6 +224,9 @@ func OwnUserID(c *tdlib.Client) int32 {
|
||||
}
|
||||
|
||||
func clientMsg(c *tdlib.Client, m TGCommand) {
|
||||
if m.Delay != 0 {
|
||||
time.Sleep(time.Duration(m.Delay * time.Second))
|
||||
}
|
||||
switch m.Type {
|
||||
case commandSendMsg:
|
||||
msgTxt := tdlib.NewInputMessageText(tdlib.NewFormattedText(m.Text, nil), true, true)
|
||||
@ -254,4 +257,3 @@ func clientMsg(c *tdlib.Client, m TGCommand) {
|
||||
log.Printf("ListenMQ : No handler for command %d.\n", m.Type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user