Skip to content

Discord Chat Customization

denisnumb edited this page May 30, 2026 · 5 revisions

ℹ️ In the [discordChatStyle] settings section, you can set custom styles for specific categories of messages received in Discord using Markdown processed by Discord.

About Configuration

ℹ️ Almost all parameters of the [discordChatStyle] section are specified in JSON format with the mandatory presence of at least one of the content and embed keys.

  • The content key allows you to specify the text of the message.
  • The embed key allows you to configure the embed attached to the message.

Warning

If invalid JSON or JSON that does not contain any of the specified keys is passed as a parameter configuration, the default value of the parameter will be used.

Content

ℹ️ The content parameter is specified as a regular string with text.

For example:

{
    "content": "Message text here!"
}

image

Embed

ℹ️ The embed parameter is specified as a JSON object with the following possible fields:

NAME TYPE DESCRIPTION
title String Embed title
description String Embed description
url String Link inserted into the embed title
color String Embed color. Transmitted in HEX or Name
author Json Object Embed author. See the object parameters in the table below.
thumbnail Json Object Small image in the upper right corner of the embed. It has one parameter url of type String
image Json Object The large image at the bottom of the embed. It has one parameter, url, of type String.
fields Json Array of Json Object Embed fields list. See field parameters in the table below.
footer Json Object Embed footer. See the object parameters in the table below.
timestamp String ISO 8601 Timestamp (YYYY-MM-DDTHH:MM:SSZ)
  • Parameters of the author object
NAME TYPE DESCRIPTION
name String Author name
url String Link inserted into the author name
icon_url String Image url (For author avatar for example)
  • Parameters of the embed field object
NAME TYPE DESCRIPTION
name String Field Name
value String Field Value
inline Boolean Should this field be displayed in the same row as other fields
  • Parameters of the footer object
NAME TYPE DESCRIPTION
text String Footer text
icon_url String Image url

Example of embed with all possible parameters:

{
	"embed": {
		"title": "Embed title",
		"description": "Embed description",
		"url": "https://github.com/denisnumb/discord-chat-mod",
		"color": "green",
		"author": {
			"name": "Author name",
			"url": "https://github.com/denisnumb",
			"icon_url": "https://avatars.githubusercontent.com/u/61795655?v=4"
		},
		"thumbnail": {
			"url": "https://static.wikia.nocookie.net/minecraft_gamepedia/images/1/12/Grass_Block_JE2.png/revision/latest?cb=20200830142618"
		},
		"image": {
			"url": "https://ichef.bbci.co.uk/ace/standard/976/cpsprodpb/0e6c/live/5e93e790-1e90-11ef-baa7-25d483663b8e.png"
		},
		"fields": [
			{
				"name": "Field 1",
				"value": "Value 1",
				"inline": false
			},
			{
				"name": "Field 2",
				"value": "Value 2",
				"inline": true
			},
			{
				"name": "Field 3",
				"value": "Value 3",
				"inline": true
			}
		],
		"footer": {
			"text": "Embed footer",
			"icon_url": "https://i.ibb.co/sJRmc5wJ/icon.png"
		},
		"timestamp": "2025-11-18T23:00:00Z"
	}
}
image

Content and Embed

ℹ️ You can specify both content and embed if needed.

{
    "content": "Message content",
    "embed": {
        "description": "Message embed"
    }
}
image

Message styles

Note

Using the JSON structure described above, you can create Discord messages for the same categories as in game chat, using the variables defined in the comments above each parameter.

Global Parameters

ℹ️ Below are some global settings that are not mentioned in the comments for each style, but can be applied in most cases:

  • {timestamp} — Current number of seconds in the system. It's convenient to substitute when using Discord timestamps, for example: <t:{timestamp}:R>

    You can configure discord timestamp format you need here: https://r.3v.fi/discord-timestamps/

  • {datetime} — A string with the current date and time in the format "2025-11-02T10:00:00.000Z". May be useful for embed timestamps.

  • Player parameters. Available wherever the {player} parameter is present.

    • {player_avatar_url} — Link to the player's avatar from Webhook Mode configuration.

    • {x}, {y}, {z} — The player's coordinates at the time the message was sent

    • {dimension} — The name of the dimension the player is in (Overworld, Nether, End, or dimensions from other mods)

Player Message Style

ℹ️ The parameters discordPlayerMessageStyle and discordPlayerMessageWebhookStyle are responsible for displaying messages from players in the game.

As you can guess from the name, the first parameter is applied if you have webhook mode disabled, and the second one if it is enabled.

ℹ️ For all types of messages sent on behalf of a player, styles are divided into normal mode and webhook mode, since both modes can be used when working with multiple Discord channels.

This style has 2 parameters:

  • {player} — Player nickname
  • {message} — Message text

The default values ​​are as follows:

discordPlayerMessageStyle = """
{
    "content": "`<{player}>` {message}"
}
"""
discordPlayerMessageWebhookStyle = """
{
    "content": "{message}"
}
"""

When sending a message from within the game

image

In normal mode, a message will be sent to Discord from the bot, indicating the player's nickname:

image

And with webhook mode enabled, this message will look like this:

image

For example, let's substitute global parameters, connect embed and apply markdown to the normal mode style:

discordPlayerMessageStyle = """
{
	"embed": {
		"description": "**{message}**",
		"author": {
			"name": "{player}",
		    "icon_url": "{player_avatar_url}"
		},
		"color": "green"
	}
}
"""
image

Result in discord:

image

Death Message Style

ℹ️ The discordPlayerDeathMessageStyle parameter is responsible for generating a Discord message about the death of a player.

This style has 2 parameters:

  • {player} — Player nickname
  • {death_message} — A complete death message for a player, including their nickname, cause of death, who killed them, and the murder weapon.

ℹ️ Each component of {death_message} can be customized with a different style:

  • Death messages in the game are composite and always contain the player who died (the {player} parameter) and the cause of death (the {death_cause} parameter).

  • If a player was killed by another player or mob, the cause of death will also include their name (the {second_entity} parameter).

  • If a player was killed using a custom-named item, its name will also be displayed as the weapon used (the {item} parameter).

ℹ️ The {player}, {second_entity}, and {item} parameters are ultimately substituted into the {death_cause} cause of death text. Therefore, the styles for each parameter are set separately in the configuration.

For example, you could make the entire cause of death text italic, and highlight individual components with different styles:

discordPlayerDeathCauseStyle = "*{death_cause}*"
discordPlayerDeathNameStyle = "**{player}**"
discordPlayerDeathSecondEntityStyle = "**{second_entity}**"
discordPlayerDeathWeaponStyle = "`{item}`"

And use the ready message in the embed:

# Player death message (configure parameters above)
# Parameters: {player}, {death_message}
discordPlayerDeathMessageStyle = """
{
    "embed": {
        "description": "{death_message}"
    }
}
"""
image

A question may arise: why is the {player} parameter here if the player's name is already in the death message text?

Answer: For example, to use {player_avatar_url}. Or to substitute the player's name in the embed header.

Let's also use another global parameter {timestamp} and look at the result:

discordPlayerDeathCauseStyle = "*{death_cause}*"
discordPlayerDeathNameStyle = "He"
discordPlayerDeathSecondEntityStyle = "**{second_entity}**"
discordPlayerDeathWeaponStyle = "`{item}`"
# Player death message (configure parameters above)
# Parameters: {player}, {death_message}
discordPlayerDeathMessageStyle = """
{
    "embed": {
		"author": {
			"name": "{player} died",
			"icon_url": "{player_avatar_url}"
		},
		"description": "{death_message} <t:{timestamp}:R>"
    }
}
image

Advancement Message Style

ℹ️ The parameters discordPlayerAdvancementTaskStyle, discordPlayerAdvancementGoalStyle and discordPlayerAdvancementChallengeStyle are responsible for generating achievement messages.

Each of these styles has the following parameters:

  • {player} — Player nickname
  • {advancement} — Advancement name
  • {description} — Advancement description
  • {icon_url} — Advancement icon url

And the translatable parameter {chat.type.advancement.*}, which provides the achievement completion text, depending on the mod's selected localization.

Instead of *, the achievement type is expected — task, goal, or challenge.

ℹ️ Each achievement type uses its own parameter. Let's look at an example with 'Task'

# Player has reached the task
# Parameters: {player}, {chat.type.advancement.task}, {advancement}, {description}, {icon_url}
discordPlayerAdvancementGoalStyle = """
{
    "embed": {
        "title": "**{advancement}**",
        "description": "{description}",
        "color": "#F1C40F",
        "author": {
            "name": "{player} {chat.type.advancement.task}",
            "icon_url": "{player_avatar_url}"
        },
        "thumbnail": {
            "url": "{icon_url}"
        },
        "timestamp": "{datetime}"
    }
}
"""
image

ℹ️ The achievement icon will also be displayed for achievements from other mods.

image

ℹ️ Of course, the icon can be placed anywhere where embed allows it.

# Player has completed the challenge
# Parameters: {player}, {chat.type.advancement.challenge}, {advancement}, {description}, {icon_url}
discordPlayerAdvancementChallengeStyle = """
{
    "embed": {
		"author": {
			"name": "{advancement}",
			"icon_url": "{icon_url}"
		},
        "description": "{description}",
        "color": "#A700A7",
        "footer": {
            "text": "{player} {chat.type.advancement.challenge}",
            "icon_url": "{player_avatar_url}"
        },
		"timestamp": "{datetime}"
    }
}
"""
image

Screenshot Message Style

ℹ️ To generate messages containing screenshots of players, two parameters are also used - for webhook mode and normal mode.

Available parameters:

  • {player} — Player nickname
  • {screenshot_url} — Url to screenshot

ℹ️ Since the message is sent with an attached file by default, there's no need to explicitly specify a link.

By default, a webhook message contains no text at all:

# Screenshot from player (if webhook mode is enabled)
# Parameters: {player}, {screenshot_url}
discordScreenshotMessageWebhookStyle = """
{
    "content": ""
}

And the message looks like this:

image

ℹ️ In this case, the parameters make sense if you want to style the message using an embed.

ℹ️ Discord processes messages in such a way that if you specify a link to an attached image in one of the embed fields, it will be moved to the Embed field and will not be attached separately.

# Screenshot from player
# Parameters: {player}, {screenshot_url}
discordScreenshotMessageStyle = """
{
    "embed": {
		"author": {
			"name": "Screenshot from {player}",
			"icon_url": "{player_avatar_url}"
		},
		"image": {
			"url": "{screenshot_url}"
		}
	}
}
"""
# Screenshot from player (if webhook mode is enabled)
# Parameters: {player}, {screenshot_url}
discordScreenshotMessageWebhookStyle = """
{
    "embed": {
		"image": {
			"url": "{screenshot_url}"
		}
	}
}
"""

In Minecraft:

image

Discord default message mode:

image

Discord webhook mode:

image

Pinned Status Message Style

ℹ️ The following parameters are responsible for generating a pinned message informing about the server status:

  • discordPinnedStatusMessageServerUnavailableStyle — Used when the server is unavailable (usually set when the server is shut down)
  • discordPinnedStatusMessageServerAvailableStyle — Used when the server is available but there are no players on it.
  • discordPinnedStatusMessageStyle — Used when the server is available and allows you to display the number and list of players

Below are examples of how each message state is formatted.

  • The server is unavailable:
# Pinned server status message when server is unavailable
# Parameters: {discord_chat_mod.server.status.unavailable}
discordPinnedStatusMessageServerUnavailableStyle = """
{
    "embed": {
        "title": "**{discord_chat_mod.server.status.unavailable}**",
		"description": "The server may be restarting.

If the server is unavailable for more than an hour, please contact <#1441512364066472099>",
        "color": "#E74C3C",
		"thumbnail": {
			"url": "https://i.ibb.co/fd3hrHS1/block.webp"
		},
		"timestamp": "{datetime}"
    }
}
"""
image
  • The server is available, but there are no players:
# Pinned server status message when server is available but there are no players
# Parameters: {discord_chat_mod.server.status.available}
discordPinnedStatusMessageServerAvailableStyle = """
{
    "embed": {
        "title": "*{discord_chat_mod.server.status.available}*",
		"description": "Hurry up and join the game!",
        "color": "gold",
		"thumbnail": {
			"url": "https://i.ibb.co/BKGPPSQt/web.png"
		},
		"timestamp": "{datetime}"
    }
}
"""
image
  • There are active players on the server:

Let's look at the available options:

  • {player_list} — List of nicknames of the first 50 players (each nickname starts on a new line)
  • {player_count} — Current number of players on the server
  • {max_players} — The maximum number of players possible on a server
  • {discord_chat_mod.server.status.online_players} — A message in the format 'Online [5/20]' already containing the current number of players on the server. The text depends on the localization selected in the configuration.
# Pinned server status message when there are players on the server
# Parameters: {discord_chat_mod.server.status.online_players}, {player_list}, {player_count}, {max_players}
discordPinnedStatusMessageStyle = """
{
    "embed": {
        "title": "{discord_chat_mod.server.status.online_players}",
        "description": "{player_list}",
        "color": "#2ECC71",
		"thumbnail": {
			"url": "https://pngimg.com/d/minecraft_PNG70.png"
		},
		"timestamp": "{datetime}"
    }
}
image

ℹ️ Or you can use parameters that provide the number of players for more flexible header generation:

"title": "There are currently `{player_count}` of `{max_players}` players on the server.",
"description": "**Now playing:**\n*{player_list}*"
image

ℹ️ You can also customize the player list using the following two parameters:

  • The discordPinnedStatusMessagePlayerListDelimiter parameter allows you to specify a sequence of characters separating the nicknames of players in the list.

By default, this is the line break character \n - meaning that each new nickname will be on a new line.

Instead, you can specify that nicknames be separated, for example, by commas:

# The characters separating player nicknames in the {player_list} parameter for the pinned status message style
discordPinnedStatusMessagePlayerListDelimiter = ", "

Result:

image


  • The discordPinnedStatusMessagePlayerListNicknameStyle parameter allows you to apply styles and additional decorations to each individual nickname in the list.

There are 2 options available here:

  • {player} — Player nickname
  • {counter} — Player's number on the list

By default, this is just the player's nickname:

# Style of a single nickname in the {player_list} parameter of a pinned status message
# Parameters: {player}, {counter} — can be used to number players in order
discordPinnedStatusMessagePlayerListNicknameStyle = "{player}"

Below are some examples of nickname design and the results of their use:

discordPinnedStatusMessagePlayerListNicknameStyle = "## `{player}`"

image

discordPinnedStatusMessagePlayerListNicknameStyle = "- `{player}`"

image

discordPinnedStatusMessagePlayerListNicknameStyle = "{counter}. `{player}`"

image

Discord Forwarded Message Style

ℹ️ If you have multiple Discord servers connected in your configuration, user messages sent to the main channel of one server will be duplicated in the main channels of other servers.

In this case, it will be useful to configure the discordGuildForwardedMessageUserNameStyle parameter, which is responsible for generating the user's nickname when forwarding a message to another server.

You can use the following parameters to create a nickname:

  • {member} — Nickname of the message author member on the server from which the message is forwarded
  • {user} — The global Discord username of the message author
  • {guild} — Guild nickname

For example, we'll specify that the member's nickname should be displayed when forwarding a message:

# The username displayed in Discord when forwarding a message from another guild
# Parameters: {member}, {user}, {guild}
discordGuildForwardedMessageUserNameStyle = "{member}"

First server chat:

image

Second server chat:

image

As a second example, consider using the user's global nickname in combination with the name of the server from which the message came:

discordGuildForwardedMessageUserNameStyle = "{user} from {guild}"

First server chat:

image

Second server chat:

image


ℹ️ Some styles were not covered in this guide because their customization is no different from the styles covered.