deleteMessage: Delete a message

View source: R/bot.R

deleteMessageR 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.


telegram.bot documentation built on Sept. 7, 2022, 5:07 p.m.