Skip to content

SetCommand

1
function SetCommand<T>(options: CommandOptions): <K>(target: K) => (...args: any[]) => __class<T, K> & K

Define the command.

Type parameters

Type parameterValue
T extends EventSubConnectionEventSubConnection

Parameters

ParameterTypeDescription
optionsCommandOptionsThe options to build up the command.

Returns

Function

The decorator function.

Type parameters

Type parameter
K extends (…args: any[]) => ChatCommand<T>

Parameters

ParameterType
targetK

Returns

(…args: any[]) => __class<T, K> & K

Source

twitchfy/packages/chatbot/src/decorators/Command.ts:24