easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 852 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction");class HasVar extends APIFunction_1.APIFunction{name="$hasVar";description=["Check if a variable exists in 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 created in the database.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null},{name:"Table",description:"Database table to check the variable in.",type:APIFunction_1.ParamType.String,required:!1,rest:!1,defaultValue:"main"}];usage="$hasVar[varName;table?]";returns=APIFunction_1.ParamType.Unknown;aliases=[];compile=!0;async run(e,[a,t]){return e.server.db.hasValue({key:a,table:t})}}exports.default=HasVar;