Getting Started
Before starting to write codes, you must know the following useful and important information first
Last updated
Was this helpful?
Before starting to write codes, you must know the following useful and important information first
Last updated
Was this helpful?
A good coding habit is separating different code blocks (like inside if-else
) by spaces.
If you want to separate your codes like the following one, I recommend that you use Tab
instead of the spacebar because Tab
creates for 4 spaces but only costs one-word space, while one spacebar equals one-word space.
Prefix: Will only be used when your command type is "Command (mention / cmd prefix)" or you are using YAGPDB's built-in commands.
Trigger: Except the "None", "Reaction", "Hourly interval", and "Minute interval" types, the other types of triggers need a trigger, some of which don't need the prefix as well
None: No trigger for this command. It can only be triggered by another command with execCC
function.
Command (mention / cmd prefix): You need prefix + trigger
or mention bot + trigger
to trigger the command. Only commands of this type need the prefix before the trigger.
Starts with: Any message that starts with the provided trigger will trigger the command.
Contains: Any message that contains the provided trigger will trigger the command.
Regex: Any message that matches the provided will trigger the command.
Exact match: Any message that is exactly equal to the trigger will trigger the command.
Reaction: The command will be triggered on specified reaction events.
Hourly interval: The command will run at an hourly interval, for example 2 hours. You can also make the command automatically exclude certain hours (UTC) or weekdays.
Minute interval: The command will run at a minute interval (5 mins at least), for example 30 minutes. You can also make the command automatically exclude certain hours (UTC) or weekdays.
If I enable case sensitive and the whole trigger (including prefix) is -hElLo
, only when I type -hElLo
will the command be triggered. But if I disable case sensitive, the command will be triggered when I type -hello
.
You can restrict or block custom commands to specific roles or channels. For this you have to select the corresponding checkbox and select the roles/channels you want it to apply too.
If you select the Require at least one of the or Only run in the Option, make sure to always have a role/channel selected otherwise the bot won't respond to your command.
You can't create more than 100 active custom commands (250 with YAGPDB Premium)
You can't execute more than 5 commands from a custom command using execAdmin
or exec
function
Custom Command responses can't be longer than 2000 characters (this is a limitation by Discord)
A Custom command itself can't be longer than 10,000 characters (this is the total count of characters and sum of all subset custom command's responses of 20), also leave/join messages limit is 5000
Custom Commands are limited to 5 userArg
calls, 5 exec
/execAdmin
functions, 10 template functions and regex calls
No more than 3 custom commands may be executed from a single message for non-premium users (5 for premium users).