UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

1 lines 633 B
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),child_process_1=require("child_process");class Execute extends APIFunction_1.APIFunction{name="$execute";description="Executes a shell command, this function can be dangerous.";parameters=[{name:"Command",description:"Command to be executed.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null}];usage="$execute[command]";returns=APIFunction_1.ParamType.String;aliases=["$exec"];compile=!0;async run(e,[n]){return(0,child_process_1.execSync)(n,{encoding:"utf-8"})}}exports.default=Execute;