-
-
Notifications
You must be signed in to change notification settings - Fork 8
Utils
Ayfri edited this page Feb 12, 2021
·
5 revisions
There are many utils functions that can be used in many places to avoid duplicating code, you can see a list here:
- ArgError : Send an argument error.
- CodeError : Send an internal error.
- PermissionsError : Send a permission error.
- GetThing : Get easily arguments of a given type.
- saveJSON : Saves a JSON safely, returning a boolean meaning if it worked.
-
readJSON : Reads a JSON, prefer using
importorrequire.
- CutIfTooLong : Cut a text at a given length (if too long).
- GetKeyByValue : Get a key from a value in an object.
-
IsOwner : Returns
trueif the given ID is included in the owners set inCommandHandler.create. - Random : Returns a random value from an array.
The official Discord support server is there.