easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 814 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Util_1=require("../../classes/internal/Util");class StringIncludes extends APIFunction_1.APIFunction{name="$stringIncludes";description="Returns whether the given text includes the provided word.";parameters=[{name:"Text",description:"The text to work with.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null},{name:"Word",description:"The word to be matched.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null}];usage="$stringIncludes[text;word]";returns=APIFunction_1.ParamType.Boolean;aliases=["$checkContains","$includes","$hasText"];compile=!0;async run(e,[t,n]){return Util_1.Util.stringBool(t.includes(n))}}exports.default=StringIncludes;