📚
YAGPDB
  • YAGPDB Coding System - Documentation
  • Getting Started
  • Useful Functions
  • Primary Level
    • The Dot and Variables
      • User
      • Guild / Server
      • Member
      • Channel
      • Message
      • Reaction
      • Time
    • Custom Types
    • Functions
      • Type Conversion
      • String Manipulation
      • Math Functions
      • Message Functions
      • Mentions
      • Role Functions
      • Current User
      • Miscellaneous
      • ExecCC
    • Conditional Branching
  • Intermediate Level
  • Database
  • Range Action
  • With Action
  • Custom Embeds
  • Advanced Level
    • Using RegEx
  • Custom Commands Examples
    • Texas Hold'em
Powered by GitBook
On this page
  • Prefix & Trigger
  • Command Types
  • Restrictions to Roles or Channels
  • Restrictions & Limitations

Was this helpful?

Getting Started

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

PreviousYAGPDB Coding System - DocumentationNextUseful Functions

Last updated 3 years ago

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.

{{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 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.

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.

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.

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.

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

regex