Minecraft

Discord events relayed to Minecraft

Overview

Your bot will observe any of the below events that occur in Discord, triggering appropriate messages to be sent to all players within Minecraft.

Templating

The messages in this section are expected to be valid JSON, just like how the /tellraw command works. Please refer to the templating guide for instructions on substituting player names, etc.

Need help building a JSON text template? Check out Minecraft JSON (non-affiliate).

Configuration

All the following messages - that are sent to Minecraft - fall under the entries[] > minecraft section.

config/chatter/discord/messages.json5
"entries": [
	{
		// ...

		// Discord events relayed to Minecraft
		"minecraft": {
			// Add event messages here
		}

		// ...
	}
]

To disable a message, you can set it to null , e.g. "chat": null

Events

A user sent a message

A member of your guild sent a message to the configured channel.

/**
 * A user sent a message
 * Use ${author}, ${tag}, ${username}, ${discriminator}, ${message} and ${datetime[:format]}
 */
"chat": "[\"\",{\"text\":\"${author}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${tag} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Sent from Discord\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",

A user edited their recently sent message

A member of your guild edited their recently sent message in the configured channel.

/**
 * A user edited their recently sent message
 * Use ${author}, ${tag}, ${username}, ${discriminator}, ${diff}, ${original}, ${message} and ${datetime[:format]}
 */
"edit": "[\"\",{\"text\":\"${author}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${tag} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Sent from Discord\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${diff}\"}]",

A user reacted to a recent message

A member of your guild reacted to a recently sent message in the configured channel.

/**
 * A user reacted to a recent message
 * Use ${issuer}, ${issuer_tag}, ${issuer_username}, ${issuer_discriminator}, ${author}, ${author_tag}, ${author_username}, ${author_discriminator}, ${emote} and ${datetime[:format]}
 */
"react": "[\"\",{\"text\":\"${issuer}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${issuer_tag} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Sent from Discord\",\"italic\":true}]}},{\"text\":\" reacted with \"},{\"text\":\"${emote}\",\"color\":\"green\"},{\"text\": \" to \"},{\"text\":\"${author}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${author_tag} \"}},{\"text\":\"'s message\"}]",

A user removed their reaction from a recent message

A member of your guild removed their recent reaction from a message in the configured channel.

/**
 * A user removed their reaction from a recent message
 * Use ${issuer}, ${issuer_tag}, ${issuer_username}, ${issuer_discriminator}, ${author}, ${author_tag}, ${author_username}, ${author_discriminator}, ${emote} and ${datetime[:format]}
 */
"unreact": "[\"\",{\"text\":\"${issuer}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${issuer_tag} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Sent from Discord\",\"italic\":true}]}},{\"text\":\" removed their reaction of \"},{\"text\":\"${emote}\",\"color\":\"red\"},{\"text\": \" from \"},{\"text\":\"${author}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${author_tag} \"}},{\"text\":\"'s message\"}]",

A user sent a message that contained attachments

A member of your guild sent a message that contained attachments to the configured channel.

The text content itself will be handled by the above chat template! Each attachment will be treated individually here.

/**
 * A user sent a message that contained attachments
 * Use ${author}, ${tag}, ${username}, ${discriminator}, ${url}, ${name}, ${ext}, ${size} and ${datetime[:format]}
 */
"attachment": "[\"\",{\"text\":\"${author}\",\"color\":\"#00aaff\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"@${tag} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Sent from Discord\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${name}\",\"color\":\"blue\",\"underlined\":true,\"clickEvent\":{\"action\":\"open_url\",\"value\":\"${url}\"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":{\"text\":\"${ext} (${size})\"}}}]"

Last updated