Skip to main content

ChatRoomMessageRunHandlers

Callable


  • Run the message handlers on a given message.

    This runs a message and its metadata through the prioritized list of ChatRoomMessageHandlers, and stops processing if one of them requests it, ignoring the rest.


    Parameters

    • type: pre | post

      The type of processing to perform

    • data: ServerChatRoomMessage

      The recieved message

    • sender: Character

      The actual message sender character object

    • msg: string

      The escaped message, likely different from data.Contents

    • optionalmetadata: IChatRoomMessageMetadata

      The message metadata, only available for post-handlers

    Returns string | boolean