Skip to content
DiamondIceNS edited this page Feb 9, 2018 · 1 revision

DiscordBridge has several options that can be configured in the config.yml file:


token: ''

This is the access token for your bot. If you need more information on how to create a bot and how to get your token, consult this very helpful tutorial.


server-id: '00000000'
channel: 'channel-name'

As of right now, this bot can only bridge chat to one channel. This is the configuration for that channel. Insert the ID of the server the channel can be found at in server-id and the channel's name in channel-name. To get the server's ID, right-click on the server's name above the channel list and select "Copy ID" to get it on your system clipboard.


username: 'DiscordBridge'

This is the bot's username that will be displayed whenever the bot speaks for itself in Minecraft, either when responding to a bot command or chatting as Cleverbot.


username-color: ''

Optional formatting code for the bot's username in Minecraft chat. Use & in place of the selector symbol. Example: &l&5 will make the bot's name appear boldface and purple. For more info on formatting codes, check the Minecraft wiki.


command-prefix: ''

Defines an optional prefix for the bot to trigger commands, both Discord-side and Minecraft-side. By default, the only way to trigger commands with the bot is to use the command after tagging the bot's name like @DiscordBridge command, but if you define a prefix (such as !!) you can instead call commands with the prefix (!!command). Consider picking a prefix that will not clash with a prefix of any other bot on your server, if any.


cleverbot-key: ''

Put a Cleverbot API key here to enable chatting with Cleverbot. A good way to spice up a lonely server. To get a Cleverbot API key, visit https://www.cleverbot.com/api/.


debug: false

If you set this to true, DiscordBridge will fill the console with a lot of extra log spam. Useful for when you're experiencing problems. Turn this on to get more information about what stage the program encounters a problem and include this information when you open an issue.


relay-cancelled-messages: true

If this is true, DiscordBridge will continue to relay a sent message from Minecraft even if another plugin or mod has canceled the message during processing. If you have no other mods or plugins installed that modify chat functions, this likely won't mean much to you.


messages:
  player-chat: true
  player-join: true
  player-leave: true
  player-death: false
  server-start: true
  server-stop: true

These toggles control which server messages are relayed to Discord.

  • player-chat - A player chats
  • player-join - A player logs in to the server
  • player-leave - A player logs out of the server
  • player-death - A player dies
  • server-start - The server has finished loading the world and is ready to be joined
  • server-stop - The server has received a stop command and is shutting down

if-vanished:
  player-chat: false
  player-join: false
  player-leave: false
  player-death: false

These toggles control whether the previous section's messages should send if the player in question is vanished using a plugin like VanishNoPacket. The previous section's toggle must already be true for the corresponding toggle in this section to have any effect.


templates:
  discord:
    chat-message: '<**%u**> %m'
    player-join: '**%u** joined the server'
    player-leave: '**%u** left the server'
    player-death: '%m'
    server-start: 'Server started!'
    server-stop: 'Shutting down...'
  minecraft:
    chat-message: '[&b&l%w&r]<%u> %m'

This section is for setting the templates for the messages that are relayed each way. Discord's templates supports Discord's Markdown syntax, and Minecraft's templates support the same syntax as seen above in the username-color field.

Additionally, you can use the following wildcards to plug in certain variables:

  • %u - The username of the one who sent the message or invoked a command, if applicable
  • %m - The raw message that would normally display, if applicable
  • %w - The name of the world the sender is in. If this is used in a Discord template, the world name will be Discord.
Clone this wiki locally