cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

Get Message ID #140

Open jordigrau83 opened 2 months ago

jordigrau83 commented 2 months ago

I want to edit a message that I'm sending to a user via:

Sent = myBot.sendTo(userid[0], msgtxt);

BUT to edit the message I need the messageID of that message, how do I get it?? the SendTo function only returns a boolean and I also tried with this method:

TBMessage msg; msg.chatId =userid[0]; myBot.sendMessage(msg, "test"); Serial.println(" messageID: " + String(msg.messageID));

but msg.messageID is not the real number :( I only get the real messageID from received messages, but I don't want to edit a received message, I want to edit the message that I send. any help?