ChatCommand
The command structure.
Type parameters
Type parameter | Value |
---|---|
T extends EventSubConnection | DefaultConnection |
Constructors
new ChatCommand()
1new ChatCommand<T>(): ChatCommand<T>
Returns
ChatCommand
<T
>
Properties
Property | Modifier | Type | Description |
---|---|---|---|
name? | readonly | string | The name of the command. |
options? | readonly | OptionsRecord | The options of the command. |
permissions? | readonly | PermissionOrArray <T >[] | The permissions of the command. |
Methods
onPermissionFallback()?
1optional onPermissionFallback(ctx: TwitchContext<undefined | OptionsRecord, T>, permissions: RequiredPerms): any
The fallback function of the command if the permissions aren’t satisfied.
Parameters
Parameter | Type |
---|---|
ctx | TwitchContext <undefined | OptionsRecord , T > |
permissions | RequiredPerms |
Returns
any
Source
twitchfy/packages/chatbot/src/structures/ChatCommand.ts:40
run()?
1optional run(ctx: TwitchContext<undefined | OptionsRecord, T>): any
The run function of the command.
Parameters
Parameter | Type |
---|---|
ctx | TwitchContext <undefined | OptionsRecord , T > |
Returns
any