deleteMessage {telegram.bot}R Documentation

Delete a message

Description

Use this method to delete a message. A message can only be deleted if it was sent less than 48 hours ago. Any such recently sent outgoing message may be deleted. Additionally, if the bot is an administrator in a group chat, it can delete any message. If the bot is an administrator in a supergroup, it can delete messages from any other user and service messages about people joining or leaving the group (other types of service messages may only be removed by the group creator). In channels, bots can only remove their own messages.

Usage

deleteMessage(chat_id, message_id)

Arguments

chat_id

Unique identifier for the target chat or username of the target channel.

message_id

Identifier of the message to delete.

Details

You can also use it's snake_case equivalent delete_message.


[Package telegram.bot version 3.0.0 Index]