UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

28 lines (27 loc) 970 B
import { CompiledFunction } from "../../classes/internal/CompiledFunction"; import { APIFunction, ParamType } from "../../classes/structures/APIFunction"; import { Data } from "../../classes/structures/Data"; export default class StringAt extends APIFunction { name: string; description: string; parameters: readonly [{ readonly name: "Text"; readonly description: "The text to work with."; readonly type: ParamType.String; readonly required: true; readonly rest: false; readonly defaultValue: null; }, { readonly name: "Index"; readonly description: "Character index to get from the text."; readonly type: ParamType.Number; readonly required: true; readonly rest: false; readonly defaultValue: null; }]; usage: string; returns: ParamType; aliases: string[]; compile: boolean; run(this: CompiledFunction, d: Data): Promise<string>; }