Closed comerc closed 3 years ago
I guess you already figured it out, putting it here for the others:
for non-formatted text:
// msg is a *tdlib.Message
// client is a *tdlib.Client
txt := "my text"
inputMsgTxt := tdlib.NewInputMessageText(tdlib.NewFormattedText(txt, nil), true, true)
client.EditMessageText(msg.ChatID, msg.ID, nil, inputMsgTxt)
and for markdown text:
// msg is a *tdlib.Message
// client is a *tdlib.Client
txt := "my text"
parsed, err := client.ParseMarkdown(tdlib.NewFormattedText(txt, nil))
if err != nil {
panic(err)
}
client.EditMessageText(msg.ChatID, msg.ID, nil, tdlib.NewInputMessageText(parsed, true, true))
Please help me! :)