easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 845 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction");class GetVar extends APIFunction_1.APIFunction{name="$getVar";description=["Get a variable from the database.","> Shown usage belongs to the default database.","> Usage can change if another databases are used."].join("\n");parameters=[{name:"Variable Name",description:"Variable name to be retrieves from the database.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null},{name:"Table",description:"Database table to get the variable from.",type:APIFunction_1.ParamType.String,required:!1,rest:!1,defaultValue:"main"}];usage="$getVar[varName;table?]";returns=APIFunction_1.ParamType.String;aliases=[];compile=!0;async run(e,[a,t]){return e.server.db.getValue({key:a,table:t})}}exports.default=GetVar;