aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
332 stars 132 forks source link

$search[command_name;seperator(Optional)] and $searchCount #139

Closed falsisdev closed 3 years ago

falsisdev commented 3 years ago

Type

$search

Description

Searches for the letter or word typed instead of command_name in the names of commands. And it returns what it finds.

Example

$description[I could not find a command called he. You may be interested in the following;
help, hello]

DJS Code

client.bot_commands.filter(x => x.name.includes("command_name")).map(x => x.name).join(", ")

$searchCount

Description

Shows the number of commands searched.

DJS Code

client.bot_commands.filter(x => x.name.includes("command_name")).map(x => x.name).length

------------------------

I could not do it as a pull request. Such a function can be done with these djs codes.

WITH $djsEval

wow

Thx

dutchman-dev commented 3 years ago

Okay, lemme test

falsisdev commented 3 years ago

Okay, lemme test

Thx ♥️

falsisdev commented 3 years ago

Channel searches similar to this can also come.

message.guild.channels.cache.filter(x => x.name.includes("channel_name")).map(x => x).join(", ")

I use them in my bot with $djsEval, but if it comes as aoijs function everyone can use it more easily. @DiscordBond ✌️

falsisdev commented 3 years ago

oh, der bond :/