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
		}

		// ...
	}
]

Events

A user sent a message

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

Token

Type

Meaning

Example

${author}

String

The message author's nickname

Ax

${tag}

String

The message author's username (w/ discriminator)

Axieum#1001

${username}

String

The message author's username

Axieum

${discriminator}

String

The message author's discriminator

1001

${message}

String

The formatted message contents

I am §lbold§r text.

${datetime[:format]}

DateTime

The current date & time

01/01/2004

/**
 * 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.

Token

Type

Meaning

Example

${author}

String

The message author's nickname

Ax

${tag}

String

The message author's username (w/ discriminator)

Axieum#1001

${username}

String

The message author's username

Axieum

${discriminator}

String

The message author's discriminator

1001

${diff}

String

The difference between the original and new message

I am §cold§r§anew§r text.

${original}

String

The original formatted message contents

I am old text.

${message}

String

The new formatted message contents

I am new text.

${datetime[:format]}

DateTime

The current date & time

01/01/2004

/**
 * 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.

Token

Type

Meaning

Example

${issuer}

String

The reactor's nickname

Ax

${issuer_tag}

String

The reactor's username (w/ discriminator)

Axieum#1001

${issuer_username}

String

The reactor's username

Axieum

${issuer_discriminator}

String

The reactor's discriminator

1001

${author}

String

The message author's nickname

timtam

${author_tag}

String

The message author's username (w/ discriminator)

timtam#9282

${author_username}

String

The message author's username

timtam

${author_discriminator}

String

The message author's discriminator

9282

${emote}

String

The emote that was used to react

😎

${datetime[:format]}

DateTime

The current date & time

01/01/2004

/**
 * 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.

Token

Type

Meaning

Example

${issuer}

String

The reactor's nickname

Ax

${issuer_tag}

String

The reactor's username (w/ discriminator)

Axieum#1001

${issuer_username}

String

The reactor's username

Axieum

${issuer_discriminator}

String

The reactor's discriminator

1001

${author}

String

The message author's nickname

timtam

${author_tag}

String

The message author's username (w/ discriminator)

timtam#9282

${author_username}

String

The message author's username

timtam

${author_discriminator}

String

The message author's discriminator

9282

${emote}

String

The emote that was removed as a reaction

😎

${datetime[:format]}

DateTime

The current date & time

01/01/2004

/**
 * 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.

Token

Type

Meaning

Example

${author}

String

The message author's nickname

Ax

${tag}

String

The message author's username (w/ discriminator)

Axieum#1001

${username}

String

The message author's username

Axieum

${discriminator}

String

The message author's discriminator

1001

${url}

String

The link to the file to download

https://cdn.discordapp.com/

${name}

String

The file name that was uploaded

My Video

${ext}

String

The file extension/type

png

${size}

String

The file size for humans

1.2 MB

${datetime[:format]}

DateTime

The current date & time

01/01/2004

/**
 * 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

Was this helpful?