BasePermission
Base class for building custom permissions.
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new BasePermission()
1new BasePermission<T>(): BasePermission<T>Returns
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
value | abstract | string | The value or identifier of the custom permission returned in onPermissionsFallback. See Command. |
Methods
check()
1abstract check(ctx: TwitchContext<object, T>): boolean | Promise<boolean>Check if the user has the custom permission to run the command.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | TwitchContext<object, T> | The context of the command which was run. |
Returns
boolean | Promise<boolean>
If the user has the custom permission to run the command.
Source
twitchfy/packages/chatbot/src/structures/BasePermission.ts:15