Skip to content

SetPermissions

1
function SetPermissions<T>(...permission: PermissionOrArray<T>[]): <K>(target: K) => (...args: any[]) => __class<T, K> & K

Set the permissions for the command.

Type parameters

Type parameterValue
T extends EventSubConnectionEventSubConnection

Parameters

ParameterTypeDescription
permissionPermissionOrArray<T>[]The permissions to set for 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/SetPermissions.ts:10