telegram api method · layer 229 · #84c1fd4e

channels.deleteMessages

usable by users and bots

Delete messages in a channel/supergroup

definition

channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages;

parameters

nametypedescription
channelInputChannelChannel/supergroup
idVector<int>IDs of messages to delete

returns

messages.AffectedMessages

errors (9)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400MSG_ID_INVALIDInvalid message ID provided.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
403MESSAGE_DELETE_FORBIDDENYou can't delete one of the messages you tried to delete, most likely because it is a service message.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
420FROZEN_METHOD_INVALIDThe current account is frozen, and thus cannot execute the specified action.

history

present in layers 46–229

idlayers
#84c1fd4e46–229