[Go to site: main page, start]

Type Alias ChatCommandCallback

ChatCommandCallback: (
    command: string,
    match: RegExpMatchArray | RegExpMatchArray[] | string[],
    chatData: object,
    createOptions: object,
) => Promise<false | void>

Called in the context of a ChatLog instance.

Type Declaration

    • (
          command: string,
          match: RegExpMatchArray | RegExpMatchArray[] | string[],
          chatData: object,
          createOptions: object,
      ): Promise<false | void>
    • Parameters

      • command: string

        The matched command name.

      • match: RegExpMatchArray | RegExpMatchArray[] | string[]

        The regex match result.

      • chatData: object

        Chat message data.

      • createOptions: object

        Options passed to ChatMessage.create.

      Returns Promise<false | void>