Skip to main content

User reacted to message

This function is triggered when any user in a channel reacts to a message.

async function handleEvent(event: UserReactedToMessageEvent, context: Context) {
}

The above function takes two parameters:

  1. The event object which in this case is the UserReactedToMessageEvent object. This object has three properties:

    • user: The user who reacted to a message.
    • message: The message to which this user reacted.
    • reaction: This is an object with details of the reaction, including the time the message was reacted to and the emoji used to react to the message.
  2. A Context object.

note

This is a non-blocking chat function.