@tryforge/forgescript
Version:
ForgeScript is a comprehensive package that empowers you to effortlessly interact with Discord's API. It ensures scripting remains easy to learn and consistently effective.
24 lines • 911 B
TypeScript
import { ArgType, Context, IArg, NativeFunction } from "..";
import { IExtendedCompilationResult } from "../../core";
import { Return, ReturnType } from "../@internal/Return";
export interface IForgeFunctionParams {
name: string;
required?: boolean;
}
export interface IForgeFunction {
name: string;
params?: Array<string | IForgeFunctionParams>;
firstParamCondition?: boolean;
brackets?: boolean;
code: string;
path?: string;
}
export declare class ForgeFunction {
readonly data: IForgeFunction;
compiled?: IExtendedCompilationResult;
constructor(data: IForgeFunction);
populate(): void;
asNative(): NativeFunction<IArg<ArgType.String, boolean, boolean, import("..").EnumLike<any>>[], any>;
call(ctx: Context, args: string[]): Promise<Return<ReturnType.Error> | Return<ReturnType.Stop | ReturnType.Success>>;
}
//# sourceMappingURL=ForgeFunction.d.ts.map