UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

18 lines (17 loc) 1.07 kB
import type { ChatCommand } from '../structures'; import { type EventSubConnection } from '../enums'; import type { DefaultConnection, PermissionOrArray } from '../types'; /** * Set the permissions for the command. * @param permission The permissions to set for the command. * @returns The decorator function. */ export declare function SetPermissions<T extends EventSubConnection = DefaultConnection>(...permission: (PermissionOrArray<T>)[]): <K extends new (...args: any[]) => ChatCommand<T>>(target: K) => { new (...args: any[]): { permissions: PermissionOrArray<T>[]; readonly name?: string | undefined; readonly options?: import("types/OptionsRecord").OptionsRecord | undefined; run?(ctx: import("structures/TwitchContext").TwitchContext<import("types/OptionsRecord").OptionsRecord | undefined, T>): any; onPermissionFallback?(ctx: import("structures/TwitchContext").TwitchContext<import("types/OptionsRecord").OptionsRecord | undefined, T>, permissions: import("types/RequiredPerms").RequiredPerms): any; }; } & K;