Variables
General variables for most of Message Templates
Common Variables
Message Templates have some common predefined variables:
Variable |
Type |
Description |
guild |
Guild |
Server information |
bot |
Member |
Member instance of JuniperBot itself |
member |
Member |
Member instance related to this template |
channel |
TextChannel |
Target channel where this template should be sent (if only guild message, not DMs) |
sourceChannel |
TextChannel |
Source channel like the channel where the custom command were invoked. It is different from channel that the last one may be different target channel selected in the message template interface. |
message |
Message |
Message instance related to this template. For example, custom command invocation message or violation message in Auto-Moderation. |
override |
Embed |
Embed overrides (allows to set template embed values by code) |
Those variables are always included in every message template. Sections below will describe some additional variables for a different message templates.
Member Ranking
Level up announcement message template has some additional variables:
Variable |
Type |
Description |
rolesAdded |
List<Role> |
List of role-rewards added |
rolesRemoved |
List<Role> |
List of role-rewards removed |
Auto-Moderation
These variables are used in Auto-Moderation Filters for violation notifications. Each filter has its own set of variables:
Links Filter
Variable |
Type |
Description |
infraction.linkUrl |
String |
Detected link |
infraction.inviteCode |
String |
Detected invite code |
Invites Filter
Variable |
Type |
Description |
infraction.inviteUrl |
String |
Detected invite link discord.gg/<code> |
Bad Words Filter
Variable |
Type |
Description |
infraction.word |
String |
Detected bad word |
Repeated Text Filter
Variable |
Type |
Description |
infraction.count |
Number |
Amount of messages triggered |
Caps Lock Filter
Variable |
Type |
Description |
infraction.percent |
Number |
Uppercase characters percent in the message |
Emotes Filter
Variable |
Type |
Description |
infraction.count |
Number |
Amount of emotes detected |
Mentions Filter
Variable |
Type |
Description |
infraction.mentionType |
String |
Type of detected excessive mentions |
infraction.count |
Number |
Amount of excessive mentions detected |
Zalgo Filter
Variable |
Type |
Description |
infraction.percent |
Number |
Percentage of Zalgo-characters to the whole message |
Subscriptions
These variables are used in Subscriptions for announcement messages:
Twitch
YouTube
VK
Variable |
Type |
Description |
post |
VkWallPost |
Post information |
Custom Commands
Additional variables passed to custom commands Actions.
Variable |
Type |
Description |
arguments |
Arguments |
Information about arguments passed to the command. |
parameters |
Parameters |
Information about parameters passed to the action. |
component |
Component |
Information about component executed the action. |
modal |
Modal |
Information about modal executed the action. |