Type alias ChatMessageHandlerDetect<INPUT_DATA, OUTPUT_DATA>

ChatMessageHandlerDetect<INPUT_DATA, OUTPUT_DATA>: ((tags: Readonly<TwitchChatUserState>, message: string, data: Readonly<INPUT_DATA>) => false | ChatMessageHandlerReplyCreatorDetectorDataOutput<OUTPUT_DATA>)

Type Parameters

  • INPUT_DATA extends object = EMPTY_OBJECT

    The additional data the command detector needs for execution.

  • OUTPUT_DATA extends object = EMPTY_OBJECT

    Data that the command detector should return when it successfully detects a command (like regular expression group matches).

Type declaration

    • (tags: Readonly<TwitchChatUserState>, message: string, data: Readonly<INPUT_DATA>): false | ChatMessageHandlerReplyCreatorDetectorDataOutput<OUTPUT_DATA>
    • A global type for a method that detects a command and return data about what was detected or return false if nothing was detected.

      Returns

      Either false or an object with information from the detection.

      Parameters

      • tags: Readonly<TwitchChatUserState>
      • message: string
      • data: Readonly<INPUT_DATA>

      Returns false | ChatMessageHandlerReplyCreatorDetectorDataOutput<OUTPUT_DATA>

Generated using TypeDoc