Add one more example for command args
This commit is contained in:
parent
6400f59b1b
commit
f36c0db78b
|
@ -107,6 +107,18 @@ func main() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("Message sent, ID: %d", m.Id)
|
log.Printf("Message sent, ID: %d", m.Id)
|
||||||
|
case "/repeat":
|
||||||
|
m, err := client.SendMessage(&tdlib.SendMessageRequest{
|
||||||
|
ChatId: chatId,
|
||||||
|
ReplyToMessageId: msgId,
|
||||||
|
InputMessageContent: &tdlib.InputMessageText{
|
||||||
|
Text: &tdlib.FormattedText{Text: tdlib.CommandArgument(msgText)},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
log.Printf("Message sent, ID: %d", m.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue