Updating messages

deleteMessageReaction()

Use this method to remove a reaction from a message in a group or a supergroup 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
message_idnumberrequiredIdentifier of the target message
user_idnumberoptionalIdentifier of the user whose reaction will be removed, if the reaction was added by a user
actor_chat_idnumberoptionalIdentifier of the chat whose reaction will be removed, if the reaction was added by a chat

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

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

await bot.api.call<boolean>("deleteMessageReaction", {
  chat_id: 123456789,
  message_id: 1,
} satisfies DeleteMessageReactionParams);

context shortcut

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

context shortcut
/** Use this method to remove a reaction from a message in a group or a supergroup chat. The bot must have the 'can_delete_messages' administrator right in the chat. Returns *True* on success. */
ctx.deleteMessageReaction(params: Omit<DeleteMessageReactionParams, "chat_id" | "message_id" | "user_id">)