DiscordSRV

DiscordSRV

86.8k Downloads

/Discord not working for Instant invites

durganmcbroom opened this issue · 2 comments

commented

After typing /discord into the chat in Minecraft instead of giving returning the instant invite it returns "Join us on Discord at http://discord.gg/changethisinmessages.yml. For command help, do "/discord ?" i have gone to messages.yml and changed "DiscordCommandFormat" to my instant invite, but it still returns the same message afterward. after restarting the server, a second messages.yml gets added, named with a seemingly random number afterward. (example: messages-3.yml). also the original messages.yml has been changed so that "DiscordCommandFormat" is reverts back to; "Join us on Discord at http://discord.gg/changethisinmessages.yml. For command help, do "/discord ?".

Extra Info:
-Running on 1.14.3
-Running on a Aternos server
-i have changed some of the original settings in messages.yml and config.yml
-Here are the 2 files that i have changed, in word form:

 Messages.yml:

Discord -> Minecraft message

DiscordToMinecraftChatMessageFormat: the format used when sending messages from Discord to Minecraft

DiscordToMinecraftChatMessageFormatNoRole: the format used when sending messages from Discord to Minecraft when the person doesn't have any roles

Available placeholders:

%allroles%: all of the person's roles combined with DiscordToMinecraftAllRolesSeparator between them all

example: Owner | Developer | Boss man

%message%: message content

example: Hello!

%toprole%: person's highest ranking role

example: Owner

%toproleinitial%: first letter of the person's highest ranking role

example: O

%toprolecolor%: approximate color of person's highest ranking role, definitions for this at DiscordChatChannelColorTranslations in config.yml

example: &4

%username%: person's name on Discord or their nickname if one is set

example: Notch

%channelname%: name of the channel that the message is coming from

example: server-chat

DiscordToMinecraftAllRolesSeparator: the separator used in between roles in %allroles%

DiscordToMinecraftChatMessageFormat: "[&bDiscord &r| %toprolecolor%%toprole%&r] %username% » %message%"
DiscordToMinecraftChatMessageFormatNoRole: "[&bDiscord&r] %username% » %message%"
DiscordToMinecraftAllRolesSeparator: " | "

Minecraft -> Discord message

MinecraftChatToDiscordMessageFormat: the format used when sending messages from Minecraft to Discord

MinecraftChatToDiscordMessageFormatNoPrimaryGroup: used in place of MinecraftChatToDiscordMessageFormat

when no primary group for the player was found

Available placeholders:

%username%: raw player username

example: jeb_

%displayname%: display name from things like nicknames

example: BigBossManJeb

%message%: message content

example: Hello!

%primarygroup%: the name of the user's primary group

%world%: name of world player is in

example: world

%worldalias%: alias of world player is in via Multiverse-Core

example: Mainland

%date%: current date & time

example: Sun Jan 1 15:30:45 PDT 2017

%channelname%: the name of the channel that the message was sent in, if the message was sent in a channel at all

example: Global

PlaceholderAPI placeholders are also supported

MinecraftChatToDiscordMessageFormat: "%primarygroup% %displayname% » %message%"
MinecraftChatToDiscordMessageFormatNoPrimaryGroup: "%displayname% » %message%"

Chat channel plugin message

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

Available placeholders:

%channelcolor%: the color character corresponding to the channel

example: messages from the channel are in red, this would replace with the red color

%channelname%: the literal name of the channel, usually the name only the server sees internally

example: staff

%channelnickname%: the formal nickname of the channel, usually the name of the channel that players see

example: Staff

%message%: the message after processing through DiscordToMinecraftChatMessageFormat / DiscordToMinecraftChatMessageFormatNoRole

example: jeb_ > Hello from the server!

ChatChannelHookMessageFormat: "%channelcolor%[%channelnickname%]&r %message%"

Discord console channel message

This is the format used when sending a line from the console to the console channel, if enabled

Available placeholders:

%date%: current date & time

example: Sun Jan 1 15:30:45 PDT 2017

%level%: message severity level

example: INFO, WARN, ERROR

%line%: line from the console

example: [DiscordSRV] Enabling DiscordSRV vX.Y

DiscordConsoleChannelFormat: "[%date% %level%] %line%"

Discord chat channel !c command error message

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

Available placeholders:

%user%: the name of the user that tried running the command

example: Notch

%error%: the reason for the error

example: no permission

DiscordChatChannelConsoleCommandNotifyErrorsFormat: "%user%, you tried running a command. Unfortunately, there was an error: %error%"

Discord chat channel player list command

Messages used for when someone runs the playerlist command in a chat channel

DiscordChatChannelListCommandFormatOnlinePlayers: the message at the beginning of the list, before all of the player names

DiscordChatChannelListCommandFormatNoOnlinePlayers: used instead for when no players are online

DiscordChatChannelListCommandPlayerFormat: the format of how each player should appear in the list

Available placeholders:

%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

PlaceholderAPI placeholders are also supported

DiscordChatChannelListCommandAllPlayersSeparator: the separator used in between players

DiscordChatChannelListCommandFormatOnlinePlayers: "Online players (%playercount%):"
DiscordChatChannelListCommandFormatNoOnlinePlayers: "No online players"
DiscordChatChannelListCommandPlayerFormat: "%displayname%"
DiscordChatChannelListCommandAllPlayersSeparator: ", "

Minecraft -> Discord player join/leave messages

Available placeholders:

%message%: join message as seen in-game

%displayname%: display name from things like nicknames

%username%: raw player username

%date%: current date & time

PlaceholderAPI placeholders are also supported

MinecraftPlayerJoinMessageFormat: ":heavy_plus_sign: %displayname% joined the server"
MinecraftPlayerFirstJoinMessageFormat: ":tada: %displayname% joined the server for the first time"
MinecraftPlayerLeaveMessageFormat: ":heavy_minus_sign: %displayname% left the server"

Minecraft -> Discord player death messages

Available placeholders:

%displayname%: display name from things like nicknames

%username%: raw player username

%deathmessage%: raw death message

%world%: the name of the world the user died in

%date%: current date & time

PlaceholderAPI placeholders are also supported

MinecraftPlayerDeathMessageFormat: ":skull: %deathmessage%"

Minecraft -> Discord achievement/advancement messages

Available placeholders:

%achievement%: title of the achievement/advancement

%displayname%: display name from things like nicknames

%username%: raw player username

%world%: the name of the world the user is in

%worldalias%: alias of world player is in via Multiverse-Core

%date%: current date & time

PlaceholderAPI placeholders are also supported

MinecraftPlayerAchievementMessagesFormat: ":medal: %displayname% has made the advancement %achievement%!"

Channel topic updater messages

This is all the stuff related to automatically updating the chat or console channel's topics with server information

ChannelTopicUpdater______ChannelTopicFormat: message to set the channel's topic to every X seconds

ChannelTopicUpdater______ChannelTopicAtShutdownFormat: message to set the channel's topic when the server shuts down

Available 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

ChannelTopicUpdaterChatChannelTopicFormat: "%playercount%/%playermax% players online | %totalplayers% unique players ever joined | Server online for %uptimemins% minutes | Last update: %date%"
ChannelTopicUpdaterConsoleChannelTopicFormat: "TPS: %tps% | Mem: %usedmemorygb%GB used/%freememorygb%GB free/%maxmemorygb%GB max | %serverversion%"
ChannelTopicUpdaterChatChannelTopicAtServerShutdownFormat: "Server is offline | %totalplayers% unique players ever joined"
ChannelTopicUpdaterConsoleChannelTopicAtServerShutdownFormat: "Server is offline | %serverversion%"

Discord command message

This is the message sent to players when they run "/discord". It's recommended to leave command syntax as a part of this

DiscordCommandFormat: "&bJoin us on Discord at http://discord.gg/changethisinmessages.yml. For command help, do "/discord ?""

Server startup/shutdown messages

DiscordChatChannelServerStartupMessage: message to be sent when server starts; leave blank to disable

DiscordChatChannelServerShutdownMessage: message to be sent when server shuts down; leave blank to disable

DiscordChatChannelServerStartupMessage: ":white_check_mark: Server has started"
DiscordChatChannelServerShutdownMessage: ":octagonal_sign: Server has stopped"

Server watchdog message

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

ServerWatchdogMessage: the message to be sent the the main chat channel.

you can @mention users by using "<@userid>", i.e. "<@12345678901234567890>"

you can @mention roles by using "<@&ROLEID>", i.e. "<@&12345678901234567890>"; see console when discordsrv loads for role ids

you can @mention the owner of the server by using "%guildowner%"

you can put the date and time of the crash in the message by using %date%

ServerWatchdogMessage: "%date% %guildowner%, the server room is on 🔥‼️"

Account link messages

These are messages used when accounts are linked

Available placeholders:

CodeGenerated: %code%: the code generated for the player to link their account with

%botname%: the name of the bot on Discord

DiscordAccountLinked: %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

MinecraftAccountLinked: %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

CodeGenerated: "Your link code is %code%. PM the bot on Discord (%botname%) containing just this code as the message to link your accounts."
DiscordAccountLinked: "Your Discord account has been linked to %name% (%uuid%)"
MinecraftAccountLinked: "&bYour UUID has been linked to Discord user %username% (%id%)"

 Config.yml:

Don't touch pls

ConfigVersion: 1.16.9

Bot token; don't know what this is? Look at the video on the plugin page for instructions

BotToken: "NTg5NjA5OTc3NDU5NzY5MzQ1.XSHziw.Rpebx1ovjCyqPl5rZleu1JbAr5w"

Channel links from game to Discord

syntax is Channels: {"in-game channel name": "numerical channel ID from Discord", "another in-game channel name": "another numerical channel ID from Discord"}

The first channel pair specified in this config option will be the "main" channel, used for sending player joins/quits/deaths/achievements/etc

Channels: {"global": "589605830081380372"}

Console channel numerical ID (NOT NAME), leave blank to disable the console channel all together

DiscordConsoleChannelId: "597514108740567070"

Debug options, don't touch unless needed

DebugLevel: 0 = no debug, 1 = debug, 2 = debug with stack traces

DebugLevel: 0
DebugJDA: false
CancelConsoleCommandIfLoggingFailed: true
RespectChatPlugins: true
ForcedLanguage: none
Experiment_WebhookChatMessageDelivery: false
PrintGuildsAndChannels: true

Disabled plugin hooks

Generally, unless you have a reason to touch this, don't

DisabledPluginHooks: []

Game information, this sets the "Playing ______" indicator for the bot, set to "" to disable

DiscordGameStatus: "Minecraft"

Chat channel information

The chat channel is the text channel that all messages in-game will be sent to and all messages sent

to this channel on Discord will be sent in-game

DiscordChatChannelDiscordToMinecraft: whether or not to send messages in the chat channel to the server chat

DiscordChatChannelMinecraftToDiscord: whether or not to send messages in the server chat to the chat channel

DiscordChatChannelTruncateLength: the maximum length of messages from Discord to be sent to Minecraft

DiscordChatChannelTranslateMentions: whether or not to translate mentions like @person for Minecraft to Discord messages

DiscordChatChannelPrefix: the character(s) required to prefix a message for it to be sent from Minecraft to Discord (example "!")

DiscordChatChannelRolesAllowedToUseColorCodesInChat: list of roles allowed to use color/format codes in Discord to Minecraft chat

DiscordChatChannelBroadcastDiscordMessagesToConsole: whether or not to print processed discord messages to the console

DiscordChatChannelRequireLinkedAccount: whether or not to require players have their Discord account linked to their Minecraft to have their Discord messages sent to Minecraft

DiscordChatChannelBlockBots: whether or not bots should be blocked from Discord -> MC chat

DiscordChatChannelBlockedIds: ids of discord users (or bots) that should not have their messages processed & sent to MC

DiscordChatChannelColorTranslations: hex representations of Discord roles to be matched with for showing role colors in-game with their in-game equivalent

DiscordChatChannelRolesSelectionAsWhitelist: if the following list should be treated as a whitelist (true) or a blacklist (false)

DiscordChatChannelRolesSelection: list of roles that are should be filtered from all of a user's roles

DiscordChatChannelDiscordToMinecraft: true
DiscordChatChannelMinecraftToDiscord: true
DiscordChatChannelTruncateLength: 256
DiscordChatChannelTranslateMentions: true
DiscordChatChannelPrefix: ""
DiscordChatChannelRolesAllowedToUseColorCodesInChat: ["Staff", "Owners", "@everyone", "ServerBot"]
DiscordChatChannelBroadcastDiscordMessagesToConsole: true
DiscordChatChannelRequireLinkedAccount: false
DiscordChatChannelBlockBots: false
DiscordChatChannelBlockedIds: ["000000000000000000", "000000000000000000", "000000000000000000"]
DiscordChatChannelColorTranslations: {
"99AAB5": "&f",
"1ABC9C": "&a",
"2ECC71": "&a",
"3498DB": "&3",
"9B59B6": "&5",
"E91E63": "&d",
"F1C40F": "&e",
"E67E22": "&6",
"E74C3C": "&c",
"95A5A6": "&7",
"607D8B": "&8",
"11806A": "&2",
"1F8B4C": "&2",
"206694": "&1",
"71368A": "&5",
"AD1457": "&d",
"C27C0E": "&6",
"A84300": "&6",
"992D22": "&4",
"979C9F": "&7",
"546E7A": "&8"
}
DiscordChatChannelRolesSelectionAsWhitelist: false
DiscordChatChannelRolesSelection: ["Don't show me!", "Misc role"]

Console channel information

The console channel is the text channel that receives messages which are then run as server commands

by the console as well as having the server's console being streamed to line by line

You can customize the message including removing timestamps in messages.yml

DiscordConsoleChannelLogRefreshRateInSeconds: rate in seconds between sending lines from the console

DiscordConsoleChannelUsageLog: the file that logs all commands being executed by users in the console channel

DiscordConsoleChannelBlacklistActsAsWhitelist: whether or not the blacklisted commands list acts as a whitelist instead of blacklist

DiscordConsoleChannelBlacklistedCommands: phrases wrapped in quotation marks that users should not be able to send as commands to the console

DiscordConsoleChannelDoNotSendPhrasesActsAsWhitelist: whether or not the do not send phrases list acts as a whitelist instead of blacklist

DiscordConsoleChannelDoNotSendPhrases: phrases wrapped in quotation marks that should not be sent to the console channel

DiscordConsoleChannelRegexFilter: the regex filter to be applied to console lines being sent to Discord

DiscordConsoleChannelRegexReplacement: what the regex filter will replace with where matches are found

DiscordConsoleChannelLevels: levels to send to console channel via appender

DiscordConsoleChannelLogRefreshRateInSeconds: 5
DiscordConsoleChannelUsageLog: "DiscordConsole.log"
DiscordConsoleChannelBlacklistActsAsWhitelist: false
DiscordConsoleChannelBlacklistedCommands: ["?", "op", "deop"]
DiscordConsoleChannelDoNotSendPhrasesActsAsWhitelist: false
DiscordConsoleChannelDoNotSendPhrases: ["async chat thread"]
DiscordConsoleChannelRegexFilter: ""
DiscordConsoleChannelRegexReplacement: ""
DiscordConsoleChannelLevels: [info, warn, error]

Chat channel command execute command

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.

DiscordChatChannelConsoleCommandEnabled: whether or not to allow console commands from a chat channel.

DiscordChatChannelConsoleCommandNotifyErrors: whether or not to send a user who tries to run a command without permission that they don't have permission

DiscordChatChannelConsoleCommandPrefix: prefix to use for console commands. e.g. "!c tps"

DiscordChatChannelConsoleCommandRolesAllowed: the user roles that are allowed to execute server commands from the chat channel

DiscordChatChannelConsoleCommandWhitelist: list of commands that are able to be ran with DiscordChatChannelConsoleCommandPrefix

DiscordChatChannelConsoleCommandWhitelistBypassRoles: list of roles that bypass the whitelist

DiscordChatChannelConsoleCommandWhitelistActsAsBlacklist: should the command whitelist act as a blacklist instead

DiscordChatChannelConsoleCommandExpiration: time in seconds until a sent command output is automatically removed by the bot. set to 0 to disable expiration.

DiscordChatChannelConsoleCommandExpirationDeleteRequest: whether or not to delete the message of the person that originally issued the command

DiscordChatChannelConsoleCommandEnabled: true
DiscordChatChannelConsoleCommandNotifyErrors: true
DiscordChatChannelConsoleCommandPrefix: "!c"
DiscordChatChannelConsoleCommandRolesAllowed: ["Developer", "Owners"]
DiscordChatChannelConsoleCommandWhitelist: ["say", "lag", "tps"]
DiscordChatChannelConsoleCommandWhitelistBypassRoles: ["Owners", "Developer"]
DiscordChatChannelConsoleCommandWhitelistActsAsBlacklist: false
DiscordChatChannelConsoleCommandExpiration: 0
DiscordChatChannelConsoleCommandExpirationDeleteRequest: true

Chat channel player list command

All the config stuff for the player list command

DiscordChatChannelListCommandEnabled: whether the command is enabled

DiscordChatChannelListCommandMessage: the command people can type to get the player list

DiscordChatChannelListCommandExpiration: time in seconds until a sent player list message is automatically removed by the bot. set to 0 to disable expiration.

DiscordChatChannelListCommandExpirationDeleteRequest: whether or not to delete the message of the person that originally requested for the player list

DiscordChatChannelListCommandEnabled: true
DiscordChatChannelListCommandMessage: "playerlist"
DiscordChatChannelListCommandExpiration: 10
DiscordChatChannelListCommandExpirationDeleteRequest: true

Chat channel blacklisted phrases & regex

DiscordChatChannelBlockedPhrases: phrases which if a message is sent in the chat channel containing a phrase here, the message won't be processed

DiscordChatChannelCutPhrases: phrases which if said in the Minecraft chat will be removed from the message before sending it to the chat channel

DiscordChatChannelRegex: regex to filter the chat going to Minecraft by

DiscordChatChannelRegexReplacement: replacement for above option

DiscordChatChannelBlockedPhrases: ["Online players (", "No online players"]
DiscordChatChannelCutPhrases: ["@everyone"]
DiscordChatChannelRegex: ""
DiscordChatChannelRegexReplacement: ""

Channel topic updater settings

ChannelTopicUpdaterChannelTopicsAtShutdownEnabled: whether or not the channel topics should be changed at server shutdown at all

ChannelTopicUpdaterRateInMinutes: amount of minutes between automatically updating the channel topics with fresh information

ChannelTopicUpdaterChannelTopicsAtShutdownEnabled: true
ChannelTopicUpdaterRateInMinutes: 5

Discord canned responses

These are triggers (commands in a way) that will trigger a "canned response" to be sent as a reply to them

You should probably change these from their defaults or add your own

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

DiscordCannedResponses: {"!ip": "yourserveripchange.me", "!site": "http://yoursiteurl.net"}

Minecraft to Discord account linking

These are the config options pertaining to how linking a Minecraft account to a Discord account functions

MinecraftDiscordAccountLinkedConsoleCommands: commands to run when an account is linked, see below for possible placeholders

MinecraftDiscordAccountUnlinkedConsoleCommands: commands to run when an account is unlinked, see below for possible placeholders

%minecraftplayername%: player's Minecraft username

example: Notch

%minecraftuuid%: player's uuid

example: you know what a uuid looks like

%discordid%: linked discord account's id

example: 12345678901234567890

%discordname%: linked discord account's username

example: Notch

MinecraftDiscordAccountLinkedRoleToAddUserTo: the name of a discord role to add a discord user to when they link their account

MinecraftDiscordAccountLinkedSetDiscordNicknameAsInGameName: whether or not to set the discord user's nickname to their in-game account name

MinecraftDiscordAccountLinkedConsoleCommands: ["", "", ""]
MinecraftDiscordAccountUnlinkedConsoleCommands: ["", "", ""]
MinecraftDiscordAccountLinkedRoleNameToAddUserTo: "Linked"
MinecraftDiscordAccountLinkedSetDiscordNicknameAsInGameName: false

Minecraft group -> Discord role synchronization

GroupRoleSynchronizationRoleIdsToSync: 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]) is effectively useless

to get your Discord guild's role IDs, run "/discord debug" and look at the first section

GroupRoleSynchronizationCycleTime: amount of minutes between repeatedly triggering synchronization for all online players

GroupRoleSynchronizationRemoveRolesOnUnlink: whether or not to remove synced roles from a Discord user when unlinking accounts

GroupRoleSynchronizationRoleIdsToSync: ["000000000000000000", "000000000000000000", "000000000000000000"]
GroupRoleSynchronizationCycleTime: 5
GroupRoleSynchronizationRemoveRolesOnUnlink: true

Server watchdog

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

ServerWatchdogEnabled: whether or not the watchdog is enabled at all

ServerWatchdogTimeout: 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

ServerWatchdogMessageCount: the amount of times ServerWatchdogMessage is sent. useful if you really want to make sure you know something's up

ServerWatchdogEnabled: true
ServerWatchdogTimeout: 30
ServerWatchdogMessageCount: 3

Ban synchronization

When a player gets banned on the server when they have a linked Discord account you can optionally ban them on the Discord server and vice versa

BanSynchronizationDiscordToMinecraft: whether or not to ban people on the Minecraft server if they get banned from the Discord server

BanSynchronizationDiscordToMinecraftReason: the message to be used as the ban reason for banning players from the Minecraft server

BanSynchronizationMinecraftToDiscord: whether or not to ban people on the Discord server if they get banned from the Minecraft server

BanSynchronizationDiscordToMinecraft: true
BanSynchronizationDiscordToMinecraftReason: "&cYou have been banned until further notice from the server because you were banned on our Discord server."
BanSynchronizationMinecraftToDiscord: false

Thank you!

commented

We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please join our Discord at https://scarsz.me/discord and go to the #support channel for help with installing or configuring DiscordSRV.

commented

You're breaking the formatting of the config. Go to the Discord for support.