Closed Amirhan-Taipovjan-Greatest-I closed 2 years ago
The fourth parameter of editMessageText() is a string and not an int:
bot.getApi().editMessageText("/", message->chat->id, message->messageId, "", "Markdown", false, 0);
You are also trying to edit the command message from the user. You can only edit messages from the bot itself. You need to get the message id of the message "|" and then use this id in editMessageText()
You need to get the message id of the message "|" and then use this id in editMessageText()
I can't figure out how I can get it!
Well, the sent message is returned on success with sendMessage()
Message::Ptr sentMessage = bot.getApi().sendMessage(message->chat->id, "|", false, 0, 0, "Markdown", false);
Sleep(5000);
bot.getApi().editMessageText("/", message->chat->id, sentMessage->messageId, "0", "Markdown", false, 0);
Thank you so much, it works!
I can't find any possible method to do that in C++.
Example: I have this part of code:
Even if
message->messageId
isn't zero or something else, I still can't do that code because it sends me to This