Skip to content

BasePermission

Base class for building custom permissions.

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BasePermission()

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

Returns

BasePermission<T>

Properties

PropertyModifierTypeDescription
valueabstractstringThe value or identifier of the custom permission returned in onPermissionsFallback. See Command.

Methods

check()

1
abstract check(ctx: TwitchContext<object, T>): boolean | Promise<boolean>

Check if the user has the custom permission to run the command.

Parameters

ParameterTypeDescription
ctxTwitchContext<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