Hey guys In my group, a user has forwarded a

message from a channel
I want to delete the message using its ID
The message link is similar to the:
t.me/mygroup/23?single

But when I try to delete message id 23 via the Telegram bot, it says this message does not exist
Has anyone ever had this or a similar problem? What way do I have?

12 ответов

25 просмотров

is message older than 48h?

M-A Автор вопроса
dotvhs
is message older than 48h?

no, sent in the last few hours

oh wait, are you using bot api or telegram api?

M-A Автор вопроса
M A
I edited my message , Telegram bot

does your bot have access to all messages?

M-A Автор вопроса
M A
yes

can you show your code then?

M-A Автор вопроса
dotvhs
can you show your code then?

It is just a curl request to the Telegram endpoint with DeleteMessage as method and and the required parameters

you are not going to delete 23 message id, you are going to delete the message_id in your group, so print the updates you receive and see the number of your message id in your (group) to delete it. Mention that it is impossible for a message id to include a string because it is (int) .

M-A Автор вопроса
A
you are not going to delete 23 message id, you are...

I haven't access to the update now I expert the message Id from the message link Yes I have sent the integer id, but not deleted I think this problem is for ?single but i haven't any idea why and what can i do

M A
I haven't access to the update now I expert the me...

You have to retrieve the message_id from the json update ..the number in the link doesn't matter

M-A Автор вопроса
Yosle
You have to retrieve the message_id from the json ...

for now there is no way to get the update If I use from the cli bot, can i get the real message id?

Похожие вопросы

Карта сайта