Add one more example for command args

This commit is contained in:
c0re100 2022-02-06 11:25:46 +08:00
parent 6400f59b1b
commit f36c0db78b
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF

View file

@ -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)
} }
} }
} }