The message context where the error come from.
The error.
Creates a boolean argument.
The value can only be true
or false
.
The options of the argument.
Creates a channel argument. The value can be a mention, an ID, or a part of a channel from the entire client.
The options of the argument.
Creates a choice argument. You must put the values possible as a string array. The value can be anything contained in the array.
The options of the argument.
A function to use when a code error occurs in a command for example.
The command context where the error come from.
The native error.
Creates a command argument. The value can be an alias or the name of a command.
The options of the argument.
Return the text cut if length is above maxLength
arg and add endTextIfTooLong
at the end.
The text to cut if it is too long.
The maximum length required.
The end text to add if it is too long.
Creates a emoji argument. The value can be a native emoji or a custom emoji.
The options of the argument.
Creates a enum argument. You must put an enum (or a record) of the possible values. The value can be any key of the possible values and it will return the value of the entry.
The options of the argument.
Creates a event argument. The value can can be any event name.
The options of the argument.
Creates a float argument. The value can be any int or float number.
The options of the argument.
Get a key from a value from an Object.
The object type.
The object to get key from.
The value.
Finds a Channel from the text, or the message content and returns null if nothing found. It can find it from ID/name/mention.
Channel DataType.CHANNEL.
A string or a Message to find dataType from.
Finds a Command from the text, or the message content and returns null if nothing found. It can find it from the name/alias.
Command DataType.COMMAND.
A string or a Message to find dataType from.
Finds an Emoji from the text, or the message content and returns null if nothing found. It can find it from the name/emoji itself/ID.
Emote DataType.EMOTE.
A string or a Message to find dataType from.
Finds a Guild from the text, or the message content and returns null if nothing found. It can find it from the name/ID.
Guild DataType.GUILD.
A string or a Message to find dataType from.
Finds a GuildMember from the text, or the message content and returns null if nothing found. It can find it from the username/ID/mention/nickname.
Member DataType.MEMBER.
A string or a Message to find dataType from.
Finds a Message from the text, or the message content and returns null if nothing found. It can find it from the name/ID/link.
Message DataType.MESSAGE.
A string or a Message to find dataType from.
Finds a Role from the text, or the message content and returns null if nothing found. It can find it from the name/ID/mention, if a message is provided, it will fetch the last 100 messages and search in it.
Role DataType.ROLE.
A string or a Message to find dataType from.
Finds a TextChannel or a NewsChannel from the text, or the message content and returns null if nothing found. It can find it from ID/name/mention.
TextChannel | NewsChannel DataType.TEXT_CHANNEL.
A string or a Message to find dataType from.
Finds a User from the text, or the message content and returns null if nothing found.
It can find it from the username/ID.
User DataType.USER.
A string or a Message to find dataType from.
Creates a guild argument. The value can be an ID or a name of a guild of the client.
The options of the argument.
Creates a guildMember argument.
The value can be an ID, mention, nickname or username of any member from the actual guild where the command was executed.
If executed in DM it will always return null
.
The options of the argument.
Creates a int argument. The value can be any integer.
The options of the argument.
Test if the ID is in the CommandHandler.owners.
The ID of the user to debug.
Check if some permission is a valid permission that exists.
The permission to test.
Returns true if the value looks like a Snowflake.
Returns true if the value is a TextChannel or a NewsChannel.
The value you want to test.
Creates a message argument. The value can be any ID or URL of a message, if the value is an ID it will search in the last 100 messages of all the channels of the current guild.
The options of the argument.
A function to use when a user, or the client hasn't all the permissions needed.
The command context where the permission where missing.
The error.
If the error is from the client.
Returns a random value from an array.
The array type.
The array to get a random value from.
Reads a JSON through its path.
The path to the JSON file.
Creates a regex argument. The value must be any valid JS regex, it also supports flags.
The options of the argument.
Saves a JSON-Like object into a JSON file.
The path of the JSON file.
The content to save.
Creates a snowflake argument. The value can be any value that ressemble a snowflake.
The options of the argument.
Creates a string argument.
The value can be anything.
It can also be filtered using the optional regex
option.
The options of the argument.
Creates a textChannel argument. The value can be an ID, mention or name of a TextChannel or a NewsChannel. If a channel is found but is not a TextChannel or a NewsChannel, it will returns null.
The options of the argument.
Creates a user argument. The value can be an ID, mention or username of an user.
The options of the argument.
Generated using TypeDoc
A function to use when a user fail on an argument of a command.