UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

28 lines (27 loc) 854 B
import type { TwitchContext } from '../structures'; import type { PermissionOrArray, RequiredPerms } from '../types'; import type { EventSubConnection } from '../enums'; /** * The result of the permission check. * @internal */ export interface PermissionCheckResult { /** * Whether the permission check passed. */ passed: boolean; /** * The permissions required to run the command. */ requiredPerms: RequiredPerms; } /** * Resolve the permissions of the command. * @param permissions The permissions to resolve. * @param ctx The context of the command. * @returns The result of the permission check. */ export declare function resolvePermissions<T extends EventSubConnection>(permissions: PermissionOrArray<T>[], ctx: TwitchContext<{}, T>): Promise<{ passed: boolean; requiredPerms: RequiredPerms; }>;