Skip to content

ChatCommand

The command structure.

Type parameters

Type parameterValue
T extends EventSubConnectionDefaultConnection

Constructors

new ChatCommand()

1
new ChatCommand<T>(): ChatCommand<T>

Returns

ChatCommand<T>

Properties

PropertyModifierTypeDescription
name?readonlystringThe name of the command.
options?readonlyOptionsRecordThe options of the command.
permissions?readonlyPermissionOrArray<T>[]The permissions of the command.

Methods

onPermissionFallback()?

1
optional onPermissionFallback(ctx: TwitchContext<undefined | OptionsRecord, T>, permissions: RequiredPerms): any

The fallback function of the command if the permissions aren’t satisfied.

Parameters

ParameterType
ctxTwitchContext<undefined | OptionsRecord, T>
permissionsRequiredPerms

Returns

any

Source

twitchfy/packages/chatbot/src/structures/ChatCommand.ts:40


run()?

1
optional run(ctx: TwitchContext<undefined | OptionsRecord, T>): any

The run function of the command.

Parameters

ParameterType
ctxTwitchContext<undefined | OptionsRecord, T>

Returns

any

Source

twitchfy/packages/chatbot/src/structures/ChatCommand.ts:34