Message.delete()

Message.delete()

Bound method delete of Message.

Use as a shortcut for:

await client.delete_messages(
    chat_id=chat_id,
    message_ids=message.id
)

Example

await message.delete()
Parameters:

revoke (bool, optional) – Deletes messages on both parts. This is only for private cloud chats and normal groups, messages on channels and supergroups are always revoked (i.e.: deleted for everyone). Defaults to True.

Returns:

True on success, False otherwise.

Raises:

RPCError – In case of a Telegram RPC error.