Updating messages

deleteAllMessageReactions()

Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a given user or chat. The bot must have the 'can_delete_messages' administrator right in the chat. Returns True on success.

parameters

parametertyperequireddescription
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target supergroup in the format @username
user_idnumberoptionalIdentifier of the user whose reactions will be removed, if the reactions were added by a user
actor_chat_idnumberoptionalIdentifier of the chat whose reactions will be removed, if the reactions were added by a chat

returns

boolean

usage in yaebal

deleteAllMessageReactions is directly typed on Api — call it straight off bot.api.

bot.ts
import type { DeleteAllMessageReactionsParams } from "@yaebal/types";

await bot.api.deleteAllMessageReactions({
  chat_id: 123456789,
} satisfies DeleteAllMessageReactionsParams);

context shortcut

also available as ctx.deleteAllMessageReactions() on 17 context types — see @yaebal/contexts.

context shortcut
/** Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a given user or chat. The bot must have the 'can_delete_messages' administrator right in the chat. Returns *True* on success. */
ctx.deleteAllMessageReactions(params: Omit<DeleteAllMessageReactionsParams, "chat_id" | "user_id">)