Answer the question
In order to leave comments, you need to log in
Telegram bot in php. Problem with deleting messages. How right?
Good day!!!
chat_id if you write to the bot in a personal message, the value is positive, if you write from the group, it is negative.
deletMessage ( 123123123, 123123 ) deletes messages fine, but not with a negative value.
How to solve this moment, tell me ...
ps . Some kind of nonsense ... Created a new group, chat_id is also a minus value - everything is perfectly deleted, but not in the desired group ...
Answer the question
In order to leave comments, you need to log in
It is necessary for the bot in the group settings to explicitly grant the rights to delete messages.
I asked myself, I answer myself ....
An error crept into the field of the table where I entered the chat_id value - the property was INT (11), valid values are not enough to record chat_id, it was not the actual chat_id that was recorded, but the boundary permissible value ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question