Miscellaneous
Last updated
Was this helpful?
Last updated
Was this helpful?
There are many useful functions that can be used in many places to avoid duplicating code, you can see a list here :
: Send an argument error.
: Send an internal error.
: Send a permission error.
: Get easily arguments of a given type.
: Saves a JSON safely, returning a boolean meaning if it worked.
: Reads a JSON, prefer using import
or require
.
: Returns true
if the given ID is included in the owners set in .
: Returns true
if the given string is a valid permission. It's also a type guard for PermissionString
type for TypeScript users.
: Cut a text at a given length (if too long).
: Get a key from a value in an object.
: Returns a random value from an array.