easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 606 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Error_1=require("../../classes/structures/Error");class HTTPStatus extends APIFunction_1.APIFunction{name="$httpStatus";description="Retrieves the status code of the HTTP request.";parameters=[];usage=this.name;returns=APIFunction_1.ParamType.Number;compile=!0;aliases=[];async run(e){if(e.internalVarExists("EATS_REQUEST"))return e.getInternalVar("EATS_REQUEST").status.toString();throw new Error_1.EATS_Error("Missing request data in: "+e.function?.name)}}exports.default=HTTPStatus;