How to delete message using Telegram API (not BOT API!)

121 views Asked by At

I need to delete specific message (TL.Message msg) from my chat. I'm trying to use var aff = await _tgSession.TgClient.Messages_DeleteMessages(new int[1] { msg.id }); but it do nothing.

this is understandable because I don't send the chat ID anywhere.

Is any other way to delete message?

1

There are 1 answers

0
Wizou On BEST ANSWER

Read the helpful tooltips when you're programming: tooltip and read the essential README about Terminology

Messages_DeleteMessages is only for legacy basic chats / user chats.
Channel_DeleteMessages is for groups & channel

even better: use helper client.DeleteMessages(...) that works in any of those cases.