Skip to content
Arraying edited this page Jul 19, 2020 · 3 revisions

Input

Often commands require you to input things such as a Discord entity (such as a user, role, channel, etc.) or durations. These are all parsed centrally with the same rules.

User (Member)

Usually denoted as user. Users can be specified with:

  • The user mention with or without nickname (<@id> or <@!id>)
  • The user ID
  • The user name and discriminator (name#discriminator) Please note that it is not possible to get a user just by username/nickname.

Channel (Text)

Usually denoted as channel. Channels can be specified with:

  • The channel mention (<#id>)
  • The channel name Please note that if there are multiple channels with the same name, the first one will be used.

Role

Usually denoted as role. Roles can be specified with:

  • The role mention (<@&id>)
  • The role name Please note that if there are multiple roles with the same name, the first one will be used.

Duration

Usually denoted as duration or time.

Essentially, the duration always points to a time in the future, relative to the current time. You cannot put an absolute time (e.g. 5pm on the 2nd August). For this, you have one or more groups of time and unit. Available groups:

  • y (years)
  • mo (months)
  • w (weeks)
  • d (days)
  • h (hours)
  • m (minutes)
  • s (seconds)

Below is a table of examples (you can use as many groups as you want):

Time Notation
1 year 1y
3 months 3mo
7 weeks and 4 days 7w4d
3 hours, 2 minutes and 1 second 3h2m1s

Regex (Regular Expression)

Usually denoted as regex.

Some commands require regular expressions. Because of this, some characters may be special characters (i.e. ?) and need to be escaped.

Correct usage: &tag create "\?luar" "Love you Arraying"

Incorrect usage: &tag create "?luar" "Love you Arraying"

The latter will treat the ? as the regex character, which will result in the tag not being triggered as the name is invalid regex.

Clone this wiki locally