Getting Started

Before starting to write codes, you must know the following useful and important information first

A good coding habit is separating different code blocks (like inside if-else) by spaces.

{{if ge 2 1}}
	{{if ge 1 0}}
		{{sendMessage nil "Hi"}}
	{{end}}
{{end}}

Prefix & Trigger

  • 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

Command Types

  • 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 regex 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.

case sensitive means that it will confirm whether the capitalization of the trigger you enter is correct. In most cases, we don't use that because it may be annoying.

Restrictions to Roles or Channels

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.

Restrictions & Limitations

  • 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).

Last updated

Was this helpful?