deleteMessages
Returns boolean ↗
Use this method to delete multiple messages simultaneously. If some of the specified messages can’t be found, they are skipped.
Required: chat_id, message_ids
Try it
TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("delete_messages", { chat_id: "YOUR_CHAT_ID", message_ids: []})Parameters
chat_id number | string Required
Unique identifier for the target chat or username of the target channel (in the format @channelusername).
message_ids number[] Required
A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted.
Related methods
deleteBusinessMessages · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · deleteMessage · deleteMyCommands · deleteStickerFromSet · deleteStickerSet · deleteStory · deleteWebhook