Skip to main content

User triggered event

This function is triggered for custom events sent using the client SDK with the ChatKitty.triggerEvent method.

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

The above function takes two parameters:

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

    • user: The user who triggered the event.
    • channel: The channel in which the triggered event occured.
    • event: The event object for the event the user triggered.
  2. A Context object.

note

This is a non-blocking chat function.