Argument Flags
Function argument flags mark how arguments within a function may be used (or hence, not used at all), it will be displayed near or below the function argument.
Example: (- userID
(Flag: Required)
) etc.
- Optional - The argument can be excluded but cannot be left empty, they show up as
(something)
and will always be after all required arguments. - Required - The argument must be included and cannot be empty.
- Emptiable - The argument must be included but can be empty.
- Vacantable - The argument can be excluded and if included can be empty.
Argument Types
This section will explain the various argument types used for function arguments. Function arguments are anything that goes in the brackets []
of a function, it will be displayed near or below the function argument.
Example: (- userID
(Type: Snowflake || Flag: Required)
) and if it has more than one option it will be (Type: String, Snowflake || Flag: Required)
etc.
- String - This is the most generalized function, a string can be any character or text.
- Snowflake - A valid discord ID, can be of a role, channel, user, server, emoji and message.
- Integer - Any number without decimal (-5, -1, 1, 5 10, etc).
- Float - A number with decimal (-2.5, -0.5, 1.5, 5.2, 7.30, etc).
- URL - A valid domain link, must be prefixed by
http://
orhttps://
and have a valid domain name. - HowMany - A number that is prefixed or suffixed with < or >, or just a plain integer.
- Enum - Strings that match a certain key value (case insensitive).
- Emoji - Emoji as 🌹 or emoji aliases in form of
:+1:
for :+1: or the discord custom emojis in form of<a:emoji_name:emoji-id>
for gif emojis and<:emoji_name:emoji-id>
for non-gif emojis, for how to get that, check $addReactions as it has explanations for that. Characters<>
can be omitted from the discord custom emoji form. - Duration - A time based duration, an integer suffixed with a valid time format (s, m, h, d, w).
- Permission - Discord permission (case insensitive), see this for all valid permissions.
- Bool - yes/no or true/false.
- Color - Color Hex Code you can get from here as an example
Pairs
- Tuple - A tuple is a set of arguments that depend on others to function, they are shown with
<>
on either side. - Ellipsis - Ellipsis notations (
...
) symbolize an argument that can be repeated multiple times. Ellipsis is denoted with...
as the argument after the argument which can be repeated.