# Custom Commands Variables

### Custom Commands Variables

| User Variables  |                    Description                   |                                                                                                                                                                                                                                                                             Example |
| --------------- | :----------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| {user.mention}  |            Returns the mentioned user.           |                                                                                                                                                                                                                                                                      @TypicalxJudan |
| {user.id}       |              Returns the user's ID.              |                                                                                                                                                                                                                                                                  756539590088851596 |
| {user.username} |           Returns the user's username.           |                                                                                                                                                                                                                                                                       TypicalxJudan |
| {user.discrim}  |         Returns the user's discriminator.        |                                                                                                                                                                                                                                                                               #2089 |
| {user.name}     |  Returns the user's username and discriminator.  |                                                                                                                                                                                                                                                                  TypicalxJudan#2089 |
| {user.nick}     |           Returns the user's nickname.           |                                                                                                                                                                                                                                                                             Typical |
| {user.avatar}   |            Returns the user's avatar.            | <img src="https://2466049591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXjNYMX3BIF-50OKbWp%2Fuploads%2F2l4GffJR0tj3pIucygXU%2Fa_aeddb7e8526290a07a0285e3b26e73c4.gif?alt=media&#x26;token=3e72c643-9ed9-4b9f-b9eb-27e20c4fd3ab" alt="" data-size="line"> |
| {user.created}  | Returns the date the user's account was created. |                                                                                                                                                                                                                                                                          09/18/2020 |
| {user.joined}   |    Returns the date the user join the server.    |                                                                                                                                                                                                                                                                          11/19/2022 |

| Server Variables           |                 Description                |                                                                                                                                                                                                                                                                                 Example |
| -------------------------- | :----------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| {server.name}              |         Returns the server's name.         |                                                                                                                                                                                                                                                                 Typical Utility Support |
| {server.id}                |          Returns the server's ID.          |                                                                                                                                                                                                                                                                      849797237470003251 |
| {server.icon}              |         Returns the server's icon.         | <img src="https://2466049591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXjNYMX3BIF-50OKbWp%2Fuploads%2FgoCdpqkaYvBXqOL3KhRq%2FTransparent%20Typical%20Utility%20Logo.png?alt=media&#x26;token=121feb2b-46b1-4364-bdbb-415329def524" alt="" data-size="line"> |
| {server.memberCount}       | Returns the amount of users in the server. |                                                                                                                                                                                                                                                                                      91 |
| {server.ownerID}           |     Returns the server owner's user ID.    |                                                                                                                                                                                                                                                                      756539590088851596 |
| {server.created}           |  Returns the date the server was created.  |                                                                                                                                                                                                                                                                              06/02/2021 |
| {server.verificationLevel} |  Returns the server's verification level.  |                                                                                                                                                                                                                                                                                  Medium |
| {server.region}            |    Returns the region the server is in.    |                                                                                                                                                                                                                                                                              us-central |

| Channel Variables |               Description              |            Example |
| ----------------- | :------------------------------------: | -----------------: |
| {channel.id}      |     Returns the current channel ID.    | 849842348488785953 |
| {channel.name}    |    Returns the current channel name.   |            general |
| {channel.mention} | Returns the current channel mentioned. |           #general |
| {channel.type}    |    Returns the current channel type.   |             thread |

| Time/Date Variables |                            Description                            |                              Example |
| ------------------- | :---------------------------------------------------------------: | -----------------------------------: |
| {time:t}            |          Returns current 12 hour time in unix timestamp.          |                           `10:23 AM` |
| {time:T}            | Returns current 12 hour time in unix timestamp including seconds. |                        `10:23:02 AM` |
| {date:d}            |         Returns current date in numbers in unix timestamp.        |                         `12/06/2022` |
| {date:D}            |              Returns current date in unix timestamp.              |                   `December 6, 2022` |
| {time:f}            |          Returns current date and time in unix timestamp.         |          `December 6, 2022 10:23 AM` |
| {time:F}            |       Returns current day, date, and time in unix timestamp.      | `Tuesday, December 6, 2022 10:23 AM` |
| {time:R}            |     Returns how long ago a message was sent in unix timestamp.    |                      `2 seconds ago` |

| Permission Variables             |                             Description                             |                                                                             Example |
| -------------------------------- | :-----------------------------------------------------------------: | ----------------------------------------------------------------------------------: |
| {onlyusers:username;error}       |            Only allows specific users to use the command.           |                                {onlyusers:TypicalxJudan;You can't use this command} |
| {onlyroles:roleName;error}       |      Only allows users with specific roles to use the command.      |                                        {onlyroles:Staff;You can't use this command} |
| {onlychannels:channelID;error}   |       Only allows the command to be used in specific channels.      |                   {onlychannels:849842348488785953;You can't use this command here} |
| {ignorechannels:channelID;error} |      Ignores the command from being used in specific channels.      |                 {ignorechannels:849842348488785953;You can't use this command here} |
| {ignoreroles:roleName;error}     | Ignores the command from being used from users with specific roles. | {ignoreroles:849842348488785953;You can't use this command, your roles are ignored} |

| Embed Response Variables |                     Description                    |                                                                                                 Example |
| ------------------------ | :------------------------------------------------: | ------------------------------------------------------------------------------------------------------: |
| {thumbnail:imageURL}     |         Adds thumbnail image to the embed.         |  {thumbnail:<https://cdn.discordapp.com/attachments/1043639101162782872/1051999829758320740/image.png>} |
| {author:message}         |          Returns the author of the embed.          |                                                                                {author:Typical Utility} |
| {authoricon:imageURL}    |        Adds author icon image to the embed.        | {authoricon:<https://cdn.discordapp.com/attachments/1043639101162782872/1051999829758320740/image.png>} |
| {authorurl:link}         |   Returns the author of the embed as a hyperlink.  |                                                            {authorurl:<https://dsc.gg/typical-utility>} |
| {title:message}          |           Returns the title of the embed.          |                                                                                 {title:Typical Utility} |
| {titleurl:link}          |   Returns the title of the embed as a hyperlink.   |                                                             {titleurl:<https://dsc.gg/typical-utility>} |
| {description:message}    |        Returns the description of the embed.       |                                                                           {description:Typical Utility} |
| {field:name;message}     | Returns the field in the description of the embed. |                                                                    {field:Title;This is my description} |
| {footer:message}         |          Returns the footer of the embed.          |                                                                                {footer:Typical Utility} |
| {footericon:imageURL}    |        Adds footer icon image to the embed.        | {footericon:<https://cdn.discordapp.com/attachments/1043639101162782872/1051999829758320740/image.png>} |
| {image:imageURL}         |           Adds banner image to the embed.          |      {image:<https://cdn.discordapp.com/attachments/1043639101162782872/1051999829758320740/image.png>} |
| {color:colorHex}         |       Adds color to the border of the embed.       |                                                                                          {color:0018FF} |
| {timestamp}              |        Adds current timestamp to the embed.        |                                                                                             {timestamp} |

| Advanced Variables           |                                            Description                                           |                                                                                 Example |
| ---------------------------- | :----------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------: |
| {everyone}                   |                                         Pings @everyone.                                         |                                                                               @everyone |
| {here}                       |                                           Pings @here.                                           |                                                                                   @here |
| {prefix}                     |                     Returns the server's current prefix for Typical Utility.                     |                                                                                      t! |
| {reply}                      |                              Reply's to the user's command trigger.                              |                                                                                 {reply} |
| {delete}                     |                                Deletes the user's command trigger.                               |                                                                                {delete} |
| {deletein:time}              |                    Deletes the bot's command response after an amount of time.                   |                               {deletein:30s} This message will be deleted in 30 seconds |
| {dm}                         |                               DM's the bot's response to the user.                               |                                                  {dm} This is a DM from Typical Utility |
| {dm:userID}                  |                            DM's the bot's response to a specific user.                           |                                 {dm:756539590088851596} This is a DM from TypicalxJudan |
| {sendchannel:channelID}      |                          Sends the bot's response to a specific channel.                         |        {sendchannel:849842348488785953} This message was triggered from another channel |
| {react:emoji}                |                           Adds emoji reaction(s) to the bot's response.                          |                                                   {react:😃;😁} Click the emoji's below |
| {cooldown:time;error}        |         Adds a cooldown with number of seconds a user must wait to use the command again.        |                                   {cooldown:30s;Wait %time% to use this command again!} |
| {server.cooldown:time;error} | Adds a server-wide cooldown with number of seconds all users must wait to use the command again. | {server.cooldown:30s;Wait %time% for everyone in the server to use this command again!} |
| {random}                     |                                    Picks a random number 1-10.                                   |                                                                                       5 |

{% hint style="warning" %}
Currently, if you use new lines in a command response on Discord, the command will not pick up the new lines, instead, it'll combine the lines together.\
If you'd like to add new lines to a command response, use this invisible space:ㅤ
{% endhint %}

<figure><img src="https://cdn.discordapp.com/attachments/855268178073485323/1049743873162887189/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://cdn.discordapp.com/attachments/855268178073485323/1049746410049916978/image.png" alt=""><figcaption></figcaption></figure>
