UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

1 lines 798 B
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Util_1=require("../../classes/internal/Util");class Ignore extends APIFunction_1.APIFunction{name="$ignore";description="Ignores the code inside.";parameters=[{name:"Code",description:"Code to be ignored.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null},{name:"Return",description:"Whether return the original input.",type:APIFunction_1.ParamType.Boolean,required:!1,rest:!1,defaultValue:"false",allowedValues:["true","false"]}];usage="$ignore[code;return?]";returns=APIFunction_1.ParamType.Unknown;compile=!1;aliases=["$c","$comment"];async run(e,[n,r="false"]){return"true"===(r=await Util_1.Util.resolveCode(e,r))?n:void 0}}exports.default=Ignore;