easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 608 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction");class Choice extends APIFunction_1.APIFunction{name="$choice";description="Returns a random text from all possible options.";parameters=[{name:"Texts",description:"The texts to set as possible options.",type:APIFunction_1.ParamType.String,required:!0,rest:!0,defaultValue:null}];usage="$choice[...texts]";returns=APIFunction_1.ParamType.String;aliases=["$randomText","$randomChoice"];compile=!0;async run(e,[...t]){return t.at(Math.floor(Math.random()*t.length))}}exports.default=Choice;