deleteMessage: Delete a message

Description Usage Arguments Details

View source: R/bot.R

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

1
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 Oct. 30, 2019, 9:40 a.m.