@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
20 lines (19 loc) • 990 B
TypeScript
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;
readonly options?: import("../types").OptionsRecord;
run?(ctx: import("../structures").TwitchContext<import("../types").OptionsRecord | undefined, T>): any;
onPermissionFallback?(ctx: import("../structures").TwitchContext<import("../types").OptionsRecord | undefined, T>, permissions: import("../types").RequiredPerms): any;
};
} & K;