You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even with try-catch block I keep getting this exception message like this:
The text was updated successfully, but these errors were encountered:
Amirhan-Taipovjan-Greatest-I
changed the title
I can't try-catch deleteMessage using messageId "message->replyToMessage->messageId"
I can't try-catch deleteMessage with messageId "message->replyToMessage->messageId"
Oct 28, 2022
I don't understand the error message. I assume it's something about memory access? If you debug this code section, then the error appears at the line with the deleteMessage()?
I have tested the code on my computer and it works: I set numb = 1. Fist, the bot sends a message. Then I reply to this message with the text "/delete" and the message is deleted.
I don't understand the error message. I assume it's something about memory access? If you debug this code section, then the error appears at the line with the deleteMessage()? I have tested the code on my computer and it works: I set numb = 1. Fist, the bot sends a message. Then I reply to this message with the text "/delete" and the message is deleted.
When someone tries to delete already requested to delete message this exception'll be thrown...
And yes, It's about memory access.
Yes, there is an error because replyToMessage (the already deleted message in this case) doesn't exist and points to zero. You would first have to check whether the message that is being replied to (replyToMessage) is valid at all and if so, then take the id of it.
Even with try-catch block I keep getting this exception message like this:
The text was updated successfully, but these errors were encountered: