-
-
Notifications
You must be signed in to change notification settings - Fork 566
Configuration
Note: 🏗 This page is under construction and not optimized. It's just a dump of information. Later updates will clean it up.
When you first start up DiscordSRV, the files config.yml, linking.yml, messages.yml, and voice.yml are automatically generated within plugins/DiscordSRV/.
Latest config files from stable branch: config.yml | linking.yml | messages.yml | voice.yml
Latest config files from development branch: config.yml | linking.yml | messages.yml | voice.yml
These config files contain informative comments to help explain what each option does. The explanations below give more insight on each option.
config | linking | messages | voice | References
Debug.. (
Level,JDA,JDARestActionStacks)
would translate to
DebugLevel, DebugJDA, DebugJDARestActionStacks
ConfigVersion | BotToken | Channels | DiscordConsoleChannelId[⁽¹⁾]
Debug.. (
Level,JDA,JDARestActionStacks)
CancelConsoleCommandIfLoggingFailed | RespectChatPlugins | ForcedLanguage
Experiment_Jdbc.. (
AccountLinkBackend,TablePrefix,Username,Password)
Experiment_WebhookChatMessage.. (
Delivery,AvatarUrl)
Experiment_MCDiscordReserializer | PrintGuildsAndChannels | ForceTLSv12 | PartnerPebbleHost | DisabledPluginHooks | DiscordGameStatus
DiscordChatChannel.. (
DiscordToMinecraft,MinecraftToDiscord,TruncateLength,TranslateMentions,Prefix,RolesAllowedToUseColorCodesInChat,BroadcastDiscordMessagesToConsole,RequireLinkedAccount,BlockBots,BlockedIds,ColorTranslations,RolesSelectionAsWhitelist,RolesSelection)
DiscordConsoleChannel.. (
LogRefreshRateInSeconds,UsageLog,BlacklistActsAsWhitelist,BlacklistedCommands,DoNotSendPhrasesActsAsWhitelist,DoNotSendPhrases,RegexFilter,RegexReplacement,Levels)
DiscordChatChannelConsoleCommand.. (
Enabled,NotifyErrors,Prefix,RolesAllowed,Whitelist,WhitelistBypassRoles,WhitelistActsAsBlacklist,Expiration,ExpirationDeleteRequest)
DiscordChatChannelListCommand.. (
Enabled,Message,Expiration,ExpirationDeleteRequest)
DiscordChatChannel.. (
BlockedPhrases,CutPhrases,Regex,RegexReplacement)
ChannelTopicUpdater.. (
ChannelTopicsAtShutdownEnabled,RateInMinutes)
MinecraftDiscordAccount.. (
LinkedConsoleCommands,UnlinkedConsoleCommands,LinkedRoleNameToAddUserTo,LinkedSetDiscordNicknameAsInGameName,LinkedAllowRelinkBySendingANewCode)
GroupRoleSynchronization.. (
RoleIdsToSync,CycleTime,RemoveRolesOnUnlink)
ServerWatchdog.. (
Enabled,Timeout,MessageCount)
BanSynchronization.. (
DiscordToMinecraft,DiscordToMinecraftReason,MinecraftToDiscord)
This is for the plugin to handle config updates. This is not something you should modify manually.
This is the token that your bot will use to connect to DiscordSRV. You can find it at the developer page for your bot. https://discordapp.com/developers/applications/me
This is a list of Minecraft text channels and their discord equivalent. The first channel in the list is used as the main channel. All additional messages like start/stop/join/quit/death/etc go to it.
The format is "Minecraft-Channel-Name": "Discord-Channel-ID". If you have no special chat channel plugin installed, the default is always global. In Discord you can get a channel's ID by right clicking a channel and choosing "Copy ID" after enabling Developer Mode in Settings → Appearance → Developer Mode.
If you have a plugin installed that supports additional chats, you can define more than one pair of linked channels. What you can't do is have multiple "Channels" with the same ID or Channel name.
Example:
Channels: {"global": "219559668236681216", "admin": "221419146028646401"}Supported chat channel plugins: Herochat, Legendchat, LunaChat, TownyChat, UltimateChat, VentureChat, and others.
This is the ID of the channel in which the Minecraft server console will be forwarded. It is highly recommended that you do not use the same Discord channel for chat and console!
These options allow you to debug several parts of DiscordSRV. It is recommended that you do not touch these unless specifically needed.
- Disables debug messages.
- Enables debug messages.
- Enables debug messages w/ Stack Trace.
Enables/Disables debug messages for JDA.
Enables/Disables the creation of exceptions for every JDA execution.
This option disables running a console command through discord if logging is unsuccessful.
This option makes it so if another chat plugin cancels a chat event, it doesn't get processed by DiscordSRV. Do not change this.
This option forcefully changes the language to the specified type.
Currently Supported Languages: [EN,FR,DE,JA,KO,NL,ES,RU,ET,ZH]
This allows the ability to connect to SQL databases.
jdbc:mysql://HOST:PORT/DATABASE?useSSL=false
Replace the capitalized words with the designated information.
The table prefix for the database.
The username for the database.
You get the gist.
Replaces minecraft messages with a webhook of the minecraft player's username and skin.
Enable/disable the experimental webhook feature
The link to pull the player's skin from.
Placeholders: {uuid}, {username}
Transforms minecraft messages formatted with format codes into Discord format, and vice versa
(&lHello &oWorld 🢂 "Hello World" 🢀 **Hello** *World*)
Prints Guilds and Channels in the console on startup.
Force set SSL to TLSv1.2
Send a sponsored message on startup on how good PebbleHost is with our promo code DiscordSRV at checkout for 15% off the first three bills.
This is a list of disabled Plugin hooks. It is highly recommended to not mess with this option.
Available hooks:
- Chat
FancyChat, Herochat, LegendChat, LunaChat, TownyChat, UltimateChat, VentureChat
- Vanish
Essentials, PhantomAdmin, SuperVanish, VanishNoPacket
- World
Multiverse
Vault
This is the game information "Playing ..." shown for the bot in Discord.
Whether or not to send messages from Discord to Minecraft. Either true or false.
Whether or not to send messages from Minecraft to Discord. Either true or false.
Maximum length of messages from Discord to Minecraft, longer messages are going to be cut off and the discord message will be reacted with "💬 ❗".
Whether or not to translate mentions like @Person for Minecraft to Discord messages
The character(s) required at the start of a message for it to be sent from Minecraft to Discord. Set to "" to not require a prefix.
States which roles are enabled to use colors when sending messages from Discord to Minecraft. Set to [] to disable.
Whether or not to print messages sent to Discord in Minecraft console. This will broadcast into the console channel if the console channel is enabled.
Whether or not to require players have their Discord account linked to their Minecraft to have their Discord messages sent to Minecraft
Whether or not bots should be blocked from Discord -> MC chat
IDs of discord users (or bots) that should not have their messages processed & sent to MC
States which codes are replaced with which colors. Author needs to have at least one of the roles configured in DiscordChatChannelRolesAllowedToUseColorCodesInChat for this to work. Don't touch anything unless you know what you are doing.
If the following list should be treated as a whitelist (true) or a blacklist (false)
List of roles that are should be filtered from all of a user's roles
The console channel is the text channel that receives messages which are then run as server commands by the console. This includes having the server's console being forwarded line by line.
Rate in seconds between new lines being sent. Unless you want really fast log, leave it at default. If you change it below 1.5 you can get ratelimited, so the bot is blocked from sending messages for a short time.
The file that logs all commands being executed by users in the console channel, and only those commands. Commands executed either in Minecraft or using the server console directly are not logged.
If the command blacklist should be interpreted as whitelist, so that only the commands on the list can be executed using the console channel. Either true (whitelist mode) or false (blacklist mode).
The blacklisted (or whitelisted) commands for the console channel. Include commands with huge outputs (Discord messages can only be 2000 characters long), commands bypassing the security system, etc. Replace with [] to not blacklist any commands.
If the DiscordConsoleChannelDoNotSendPhrases is used as a whitelist. If true, only matching messages are sent.
Phrases that should not be sent to the console channel
The Regex-Filter to be applied to messages from the console sent to Discord. If you are unfamiliar with Regex, it is likely that you don't need this option.
What the Regex-Filter matches are replaced with.
The different debug levels that are sent to the console.
Options: ["debug", "info", "warn", "error"]
These options control the ability to say "!c kick Notch", or whatever the prefix is to run a command, as the console, from a registered chat channel.
If this feature is enabled at all. Set to false to disable.
Whether or not to send a user who tries to run a command without permission a message that they don't have permission.
Prefix to use for console commands in the chat channel.
List of roles for which this feature is enabled. If you don't want anyone to be able to use it, set DiscordChatChannelConsoleCommandEnabled to false.
List of commands that can be run using the prefix set in DiscordChatChannelConsoleCommandPrefix and the command, e.g. !c tps
List of roles which can bypass the whitelist, e.g. execute any command. Set to [] to disable.
Whether or not to use the whitelist in blacklist mode, e.g. all commands except for listed ones can be run.
Time in seconds until the response to a command is automatically removed. Set to 0 to disable.
Whether or not to also remove the original, user-sent command as well.
Whether or not this command is enabled.
The required message for the playerlist to be sent.
Time in seconds until the playerlist-message is going to be deleted again. Set to 0 to disable.
hether or not the requesting message should be deleted as well.
DiscordSRV will not process messages that include these phrases
These phrases will be removed before being sent to Discord
Filter what gets sent from Minecraft->Discord using Regex
Regex replacement for above
whether or not the channel topics should be changed at server shutdown. set to false to disable
amount of minutes between automatically updating the channel topics with fresh information. Minimum is 5 minutes, which was suggested by a Discord Developer.
These are commands that will be sent as a reply in the channel it was ran in.
Syntax is {"TRIGGER": "RESPONSE", "TRIGGER": "RESPONSE", ...} If you do not want any canned responses, set this to just {}.
PlaceholderAPI placeholders are supported for the values
commands to run when an account is linked
commands to run when an account is unlinked
the name of a discord role to add a discord user to when they link their account
whether or not to set the discord user's nickname to their in-game account name
allows sending a new code to the bot to unlink and relink with the new code
these are Discord role IDs that you want to be synchronized from Minecraft to Discord. If a role ID is not here, the permission for it (discordsrv.sync.[role id]) will not work. To get your Discord guild's role IDs, run "/discord debug" and look at the first section or right click on a role in someone's profile
amount of minutes between repeatedly triggering synchronization for all online players
whether or not to remove synced roles from a Discord user when unlinking accounts
whether or not the watchdog is enabled at all
time in seconds that need to elapse before the watchdog takes action (Spigot's crash detection uses 60 for this) the minimum for this value is 10
the amount of times ServerWatchdogMessage is sent. useful if you really want to make sure you know something's up
whether or not to ban people on the Minecraft server if they get banned from the Discord server
the message to be used as the ban reason for banning players from the Minecraft server
whether or not to ban people on the Discord server if they get banned from the Minecraft server
Enabled | Listener priority | Bypass names | Whitelisted players bypass check | Not linked message
Subscriber role (
Require subscriber role to join,Subscriber roles,Require all of the listed roles,Kick message)
Messages (
DiscordSRV still starting,Failed to find subscriber role,Failed for unknown reason,Kicked for unlinking)
Enable/Disable the Require linked account to play module.
Control the priority Require linked account to play's join listener is on.
Minecraft IGNs to always allow (overrides )
Whether to bypass players listed in the vanilla whitelist or not.
The kick message that gets displayed if the user's account isn't linked Placeholders:
-
{BOT}The Bot's name. [DiscordSRVBot#1234] -
{CODE}The verification code required for DMing the bot. [4321]
Optionally require people to not only be linked but to have one/all specified role[s].
Enable/Disable requiring a discord role to join Minecraft server.
The roles required to join the server.
Enable/Disable requiring all listed roles. When false, only one of the roles listed in Subscriber roles is required.
The message that gets displayed when a user gets kicked for not having a/all role/s.
What gets displayed as the kick reason if someone attempts to join before DiscordSRV loads up.
What gets displayed as the kick reason if the required role[s] were not found on the server.
What gets displayed as the kick reason if an error occurs.
What gets displayed as the kick reason if the player unlinks in-game.
DiscordToMinecraft.. (
ChatMessageFormat,ChatMessageFormatNoRole,AllRolesSeparator)
MinecraftChatToDiscordMessage.. (Format,FormatNoPrimaryGroup)
ChatChannelHookMessageFormat | DiscordConsoleChannelFormat | DiscordChatChannelConsoleCommandNotifyErrorsFormat
DiscordChatChannelListCommand.. (FormatOnlinePlayers,FormatNoOnlinePlayers,PlayerFormat,AllPlayersSeparator)
MinecraftPlayer.. (JoinMessageFormat,FirstJoinMessageFormat,LeaveMessageFormat,DeathMessageFormat,AchievementMessagesFormat)
ChannelTopicUpdater.. (ChatChannelTopicFormat,ConsoleChannelTopicFormat,ChatChannelTopicAtServerShutdownFormat,ConsoleChannelTopicAtServerShutdownFormat)
DiscordCommandFormat
DiscordChatChannelServer.. (StartupMessage,ShutdownMessage)
ServerWatchdogMessage | CodeGenerated | DiscordAccountLinked | MinecraftAccountLinked
Placeholders:
-
%allroles%All the user's roles separated byDiscordToMinecraftAllRolesSeparator[Owner | Developer | Boss man] -
%message%The Message content. [Hello!] -
%toprole%The user's highest ranking role. [Owner] -
%toproleinitial%The first initial of the user's highest ranking role. [O] -
%toprolecolor%The approximate color of that role defined inDiscordChatChannelColorTranslations[&4] -
%username%The user's username/nickname if set [scarsz] -
%channelname%The name of the Discord channel the message is coming from. []
The format used when sending messages from Discord to Minecraft.
The format used when sending messages from Discord to Minecraft for the user with no roles.
The separator used in between roles in %allroles%
Placeholders (PlaceholderAPI supported):
-
%username%raw player username -
%displayname%display name from things like nicknames -
%message%message content -
%primarygroup%the name of the user's primary group -
%world%name of world player is in -
%worldalias%alias of world player is in via Multiverse-Core -
%date%current date & time -
%channelname%the name of the channel that the message was sent in, if the message was sent in a channel at all
the format used when sending messages from Minecraft to Discord.
used in place of MinecraftChatToDiscordMessageFormat when no primary group for the player was found.
This is a special message that's only used when a supported chat channel plugin is hooked.
It modifies what the message would be like in-game to include information related to the channel the message is from.
Placeholders:
-
%channelcolor%the color character corresponding to the channel -
%channelname%the literal name of the channel, usually the name only the server sees internally -
%channelnickname%the formal nickname of the channel, usually the name of the channel that players see -
%message%the message after processing throughDiscordToMinecraftChatMessageFormat/DiscordToMinecraftChatMessageFormatNoRole
This is the format used when sending a line from the console to the console channel, if enabled
Placeholders:
-
%date%current date & time -
%level%message severity level -
%line%line from the console
Used when an error occurs with permissions for the player to run the command, not an error running the command itself. This is sent as a PM to the user.
Placeholders:
-
%user%the name of the user that tried running the command. -
%error%the reason for the error.
the message at the beginning of the list, before all of the player names.
used instead for when no players are online
the format of how each player should appear in the list
Placeholders (PlaceholderAPI supported):
-
%username%: raw player username -
%displayname%: display name from things like nicknames -
%primarygroup%: the name of the user's primary group -
%world%: name of world player is in -
%worldalias%: alias of world player is in via Multiverse-Core
the separator used in between players
Placeholders (PlaceholderAPI supported):
-
%displayname%display name from things like nicknames -
%username%raw player username -
%date%current date & time
-
%message%join message as seen in-game The message that gets broadcasted when a player joins the server.
-
%message%join message as seen in-game The message that gets broadcasted when a player joins for the first time.
The message that gets broadcasted when a player leaves.
The message that gets broadcasted on player death.
Placeholder specific to this option:
-
%deathmessage%Raw death message.
The message that gets broadcasted when a player gets an achievement. Placeholder specific to this option:
-
%achievement%Title of the achievement/advancement.
Placeholders:
-
%playercount%current player count -
%playermax%maximum player count -
%date%current date -
%totalplayers%total amount of players to ever join the main world -
%uptimemins%amount of minutes since DiscordSRV has started -
%uptimehours%amount of hours since DiscordSRV has started -
%motd%motto of the day of the server -
%serverversion%server version such as Spigot-1.9 -
%freememory%free memory of the JVM in MB -
%usedmemory%used memory of the JVM in MB -
%totalmemory%total memory of the JVM in MB -
%maxmemory%max memory of the JVM in MB -
%freememorygb%free memory of the JVM in GB -
%usedmemorygb%used memory of the JVM in GB -
%totalmemorygb%total memory of the JVM in GB -
%maxmemorygb%max memory of the JVM in GB -
%tps%average TPS of the server
message to set the chat channel's topic to every X seconds
message to set the console channel's topic to every X seconds
message to set the chat channel's topic when the server shuts down
message to set the console channel's topic when the server shuts down
This is the message sent to players when they run "/discord". It's recommended to leave command syntax as a part of this.
message to be sent when server starts; leave blank to disable
message to be sent when server shuts down; leave blank to disable
The watchdog constantly monitors the last time your server performed a game tick.
If the time since the last tick goes above the set interval in seconds, Discord messages can be triggered.
Placeholders:
-
%guildowner%The guild owner's mention tag. -
%date%The date & time when the message gets sent.
Placeholders:
-
%code%the code generated for the player to link their account with -
%botname%the name of the bot on Discord
Placeholders:
-
%name%the name of the Minecraft player that the user's Discord account was linked to -
%uuid%the uuid of the Minecraft player that the user's Discord account was linked to
Placeholders:
-
%id%the discord id of the Discord user that the user's Minecraft account was linked to -
%username%the discord name of the Discord user that the user's Minecraft account was linked to
Voice enabled | Tick speed | Voice category | Lobby channel
Network (
Strength,Falloff,Allow voice activation detection)
Enables/Disables the voice module.
The tick delay between network updates.
The category that will handle voice channels in
The voice channel (inside the voice category) that people will be moved to
Maximum distance between players in order to be connected.
Once a player has joined a network, they can be Strength + Falloff blocks away from the other player before being disconnected.
Whether or not to allow VAD in voice channels.
- Requires a server restart for changes to take effect.
[⁽¹⁾]: Configuration#References