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