Type Alias MessageEvents

    MessageEvents: {
        adminCommand: [text: string, nodes: MessageNode[]];
        chat: [message: string, player: Player, nodes: MessageNode[]];
        collected: [text: string, player: Player, nodes: MessageNode[]];
        connected: [text: string, player: Player, tags: string[], nodes: MessageNode[]];
        countdown: [text: string, value: number, nodes: MessageNode[]];
        disconnected: [text: string, player: Player, nodes: MessageNode[]];
        goaled: [text: string, player: Player, nodes: MessageNode[]];
        itemCheated: [text: string, item: Item, nodes: MessageNode[]];
        itemHinted: [text: string, item: Item, found: boolean, nodes: MessageNode[]];
        itemSent: [text: string, item: Item, nodes: MessageNode[]];
        message: [text: string, nodes: MessageNode[]];
        released: [text: string, player: Player, nodes: MessageNode[]];
        serverChat: [message: string, nodes: MessageNode[]];
        tagsUpdated: [text: string, player: Player, tags: string[], nodes: MessageNode[]];
        tutorial: [text: string, nodes: MessageNode[]];
        userCommand: [text: string, nodes: MessageNode[]];
    }

    An interface with all supported message events and their respective callback arguments. To be called from MessageManager.

    Type declaration

    • adminCommand: [text: string, nodes: MessageNode[]]

      Fires on the result of running an admin command via !admin.

      The plaintext message content.

      An array of message nodes in this message with additional context for each textual component.

    • chat: [message: string, player: Player, nodes: MessageNode[]]

      Fires when a player chat message is received.

      The plaintext message content without the sender name prefix.

      The metadata of the player who sent this message.

      An array of message nodes in this message with additional context for each textual component.

      nodes will contain the sender name prefix from the server, but message will not.

    • collected: [text: string, player: Player, nodes: MessageNode[]]

      Fires when a player has collected their remaining items from the multi-world.

      The plaintext message content.

      The player that collected.

      An array of message nodes in this message with additional context for each textual component.

    • connected: [text: string, player: Player, tags: string[], nodes: MessageNode[]]

      Fires when a client connects to the room session.

      The plaintext message content.

      The player being connected as.

      The tags of the joining client.

      An array of message nodes in this message with additional context for each textual component.

    • countdown: [text: string, value: number, nodes: MessageNode[]]

      Fires when a countdown message is received.

      The plaintext message content.

      The current countdown value.

      An array of message nodes in this message with additional context for each textual component.

    • disconnected: [text: string, player: Player, nodes: MessageNode[]]

      Fires when a client disconnects from the room session.

      The plaintext message content.

      The player being disconnected from.

      An array of message nodes in this message with additional context for each textual component.

    • goaled: [text: string, player: Player, nodes: MessageNode[]]

      Fires when a connected player has met their goal condition.

      The plaintext message content.

      The player that reached their goal.

      An array of message nodes in this message with additional context for each textual component.

    • itemCheated: [text: string, item: Item, nodes: MessageNode[]]

      Fires when another player is sent a cheated item.

      The plaintext message content.

      The item being sent.

      An array of message nodes in this message with additional context for each textual component.

    • itemHinted: [text: string, item: Item, found: boolean, nodes: MessageNode[]]

      Fires when a hint-style message is received.

      The plaintext message content.

      The item being hinted.

      If the item was found.

      An array of message nodes in this message with additional context for each textual component.

      This event is for hint messages received. To track more information on when hints are updated, utilize one of the hint-type events on ItemsManager instead.

    • itemSent: [text: string, item: Item, nodes: MessageNode[]]

      Fires when another player is sent an item (except for cheated items).

      The plaintext message content.

      The item being sent.

      An array of message nodes in this message with additional context for each textual component.

    • message: [text: string, nodes: MessageNode[]]

      Fires when any kind of message is received.

      The plaintext message content.

      An array of message nodes in this message with additional context for each textual component.

    • released: [text: string, player: Player, nodes: MessageNode[]]

      Fires when a player has released their remaining items to the multi-world.

      The plaintext message content.

      The player that released.

      An array of message nodes in this message with additional context for each textual component.

    • serverChat: [message: string, nodes: MessageNode[]]

      Fires when a server chat message is received.

      The plaintext message content without the sender name prefix.

      An array of message nodes in this message with additional context for each textual component.

      nodes will contain the sender name prefix from the server, but message will not.

    • tagsUpdated: [text: string, player: Player, tags: string[], nodes: MessageNode[]]

      Fires when a client updates their tags.

      The plaintext message content.

      The player this client is connected to.

      The new tags for this client.

      An array of message nodes in this message with additional context for each textual component.

    • tutorial: [text: string, nodes: MessageNode[]]

      Fires when tutorial-like information is received, such as on first connection explaining !help.

      The plaintext message content.

      An array of message nodes in this message with additional context for each textual component.

    • userCommand: [text: string, nodes: MessageNode[]]

      Fires on the result of running a user command, such as !status.

      The plaintext message content.

      An array of message nodes in this message with additional context for each textual component.