# Read more about configuration here: https://github.com/denisnumb/discord-chat-mod/wiki
# 
# Bot access token
# [!] Make sure all Privileged Gateway Intents are enabled on https://discord.com/developers/applications/<your_app_id>/bot
# [!] Make sure the bot has the following permissions on the server:
# [!] - VIEW_CHANNEL
# [!] - MESSAGE_SEND
# [!] - MESSAGE_SEND_IN_THREADS
# [!] - MESSAGE_EMBED_LINKS
# [!] - MESSAGE_ATTACH_FILES
# [!] - PIN_MESSAGES
# [!] - MESSAGE_HISTORY
discordBotToken = ""
# Do logging to the server console messages from discord
logDiscordMessages = true
# Notify about internal Discord interaction errors in the server's in-game chat
logDiscordErrorsToServerChat = true
# If logDiscordErrorsToServerChat=true, then the errors in the chat will be seen by players with the specified selector
# By default, "@a" — all players. You can specify a specific nickname or attribute, for example, "@a[tag=admin]"
discordErrorsChatPlayerSelector = "@a"
# Mod locale
modLocale = "en_us"
# Discord channel ID for logs from Minecraft Server console
# Leave blank if you don't want to send server logs to Discord.
serverLogsChannelId = ""
# The minimum level of logs that will be sent to Discord.
# Possible values: ERROR, WARN, INFO
serverLogsToDiscordLoggingLevel = "INFO"
# The offset of the current time from UTC in hours.
# Used to generate timestamps for message style configurations.
# Default: 0
# Range: -12 ~ 14
utcOffsetHours = 0

[webhookModeConfig]
	# If true, server and player messages will be sent in webhook mode.
	# [!] Webhook mode works only in regular channels (Threads does not work)
	# [!] The bot must have Manage Webhooks permission
	enableWebhookMode = false
	# Webhook name for displaying server messages
	webhookServerName = "Minecraft Server"
	# Avatar url for the webhook for displaying server messages
	# Leave blank to display the connected bot's avatar
	webhookServerAvatarUrl = ""
	# If true, then all players will have access to the /set_avatar_url <url> command to set a custom avatar, which will be used instead of the webhookPlayerAvatarUrl parameter.
	# The /remove_avatar_url command will also be available to remove an avatar.
	enableSetAvatarUrlCommand = true
	# Url to get the player's display avatar
	# You can specify a link with dynamic parameters <uuid> and <name>, which will be automatically substituted when requesting an image
	# <uuid> — player's UUID
	# <name> — player's nickname
	# Default: https://mc-heads.net/avatar/<name>.png
	webhookPlayerAvatarUrl = "https://mc-heads.net/avatar/<name>.png"
	# Url to get the player's display avatar if dynamic link is invalid
	# Default: https://mc-heads.net/avatar/steve_head_png
	webhookPlayerDefaultAvatarUrl = "https://mc-heads.net/avatar.png"

[discordProxyConfig]
	# Configuring the HTTP proxy when connecting with Discord. Do not modify if you don't understand what this is.
	proxyHostname = ""
	# Default: 1234
	# Range: 0 ~ 65535
	proxyPort = 1234
	# Leave blank if no certificate required.
	proxyUser = ""
	proxyPassword = ""

[minecraftChatStyle]
	# If true, messages in the game chat will be formatted in the formats specified below.
	# For each format, you can use dynamic parameters specified in the comment above the parameter.
	# Global parameters available for all styles listed below:
	# {HH}, {MM}, {SS} — Hours, minutes, and seconds at the time the message was sent. Example usage: "[{HH}:{MM}] <{player}> {message}"
	# You can read more about this configuration section and see examples here: https://github.com/denisnumb/discord-chat-mod/wiki/Minecraft-Chat-Customization
	# [!] If enabled, make sure you don't have any other chat styling mods installed.
	enableMinecraftChatCustomization = false
	# Color of links in game chat
	minecraftChatLinkColor = "#00b7ff"
	# Style for displaying Discord messages in game chat
	# Parameters: {guild}, {member}, {message}
	# Default: "**<#5f78d9>[discord]<#5f78d9/>** <{member}> {message}"
	minecraftDiscordMessagesStyle = "**<#5f78d9>[discord]<#5f78d9/>** <{member}> {message}"
	# Chat message from player
	# Parameters: {player}, {message}
	# Default: "<{player}> {message}"
	minecraftPlayerMessageStyle = "<{player}> {message}"
	# Player joined the game
	# Parameters: {player}, {multiplayer.player.joined}
	# Default: "<yellow>{player} {multiplayer.player.joined}<yellow/>"
	minecraftPlayerJoinedStyle = "<yellow>{player} {multiplayer.player.joined}<yellow/>"
	# Player left the game
	# Parameters: {player}, {multiplayer.player.left}
	# Default: "<yellow>{player} {multiplayer.player.left}<yellow/>"
	minecraftPlayerLeftStyle = "<yellow>{player} {multiplayer.player.left}<yellow/>"
	# Player death message
	# Death messages are composite and contain: Player Name, Cause of Death, Second Entity (optional), Murder Weapon (optional).
	# You can customize them separately using the configuration fields below.
	# Parameters: {death_cause}, {player}, {second_entity}, {item}
	minecraftPlayerDeathCauseStyle = "{death_cause}"
	minecraftPlayerDeathNameStyle = "{player}"
	minecraftPlayerDeathSecondEntityNameStyle = "{second_entity}"
	minecraftPlayerDeathWeaponStyle = "{item}"
	# Player has made the advancement
	# Parameters: {player}, {chat.type.advancement.task}, {advancement}
	# Default: "{player} {chat.type.advancement.task} <green>{advancement}<green/>"
	minecraftPlayerAdvancementTaskStyle = "{player} {chat.type.advancement.task} <green>{advancement}<green/>"
	# Player has reached the goal
	# Parameters: {player}, {chat.type.advancement.goal}, {advancement}
	# Default: "{player} {chat.type.advancement.goal} <green>{advancement}<green/>"
	minecraftPlayerAdvancementGoalStyle = "{player} {chat.type.advancement.goal} <green>{advancement}<green/>"
	# Player has completed the challenge
	# Parameters: {player}, {chat.type.advancement.challenge}, {advancement}
	# Default: "{player} {chat.type.advancement.challenge} <darkpurple>{advancement}<darkpurple/>"
	minecraftPlayerAdvancementChallengeStyle = "{player} {chat.type.advancement.challenge} <darkpurple>{advancement}<darkpurple/>"
	# Team message sent by the player
	# Parameters: {team}, {player}, {message}
	# Default: "-> {team} <{player}> {message}"
	minecraftTeamMessageSentStyle = "-> {team} <{player}> {message}"
	# Team message received from any player
	# Parameters: {team}, {player}, {message}
	# Default: "{team} <{player}> {message}"
	minecraftTeamMessageReceivedStyle = "{team} <{player}> {message}"
	# Private message sent by the player using /tell or /msg command
	# Parameters: {commands.message.display.outgoing}, {receiver}, {message}
	# Default: "<grey>*{commands.message.display.outgoing} {receiver}: {message}*<grey/>"
	minecraftTellMessageSentStyle = "<grey>*{commands.message.display.outgoing} {receiver}: {message}*<grey/>"
	# Private message received from any player who used the /tell or /msg command
	# Parameters: {sender}, {commands.message.display.incoming}, {message}
	# Default: "<grey>*{sender} {commands.message.display.incoming}: {message}*<grey/>"
	minecraftTellMessageReceivedStyle = "<grey>*{sender} {commands.message.display.incoming}: {message}*<grey/>"
	# Chat message from player sent using /say command
	# Parameters: {player}, {message}
	# Default: "[{player}] {message}"
	minecraftSayCommandStyle = "[{player}] {message}"
	# Chat message from player sent using /me command
	# Parameters: {player}, {message}
	# Default: "* {player} {message}"
	minecraftMeCommandStyle = "* {player} {message}"

[discordChatStyle]
	# The configuration settings below determine how messages sent from Minecraft to Discord will be formatted.
	# The message format is specified in JSON format. You can remove the parameter from the configuration to get the default value
	# For each format, you can use dynamic parameters specified in the comment above the parameter.
	# Global parameters available for all styles listed below:
	# {player_avatar_url} — link to the player's avatar (available wherever the {player} parameter is present)
	# {timestamp} — current number of seconds in the system. It's convenient to substitute when using Discord timestamps, for example: <t:{timestamp}:R>
	# {datetime} — A string with the current date and time in the format "2025-11-02T10:00:00.000Z". May be useful for embed timestamps.
	# You can read more about this configuration section and see examples here: https://github.com/denisnumb/discord-chat-mod/wiki/Discord-Chat-Customization
	# 
	# Chat message from player
	# Parameters: {player}, {message}
	discordPlayerMessageStyle = """
{
    "content": "`<{player}>` {message}"
}
"""
	# Chat message from player (if webhook mode is enabled) 
	# Parameters: {player}, {message}
	discordPlayerMessageWebhookStyle = """
{
    "content": "{message}"
}
"""
	# Player joined the game
	# Parameters: {player}, {multiplayer.player.joined}
	discordPlayerJoinedStyle = """
{
    "embed": {
        "author": {
            "name": "{player} {multiplayer.player.joined}",
            "icon_url": "{player_avatar_url}"
        },
        "color": "#2ECC71"
    }
}
"""
	# Player left the game
	# Parameters: {player}, {multiplayer.player.left}
	discordPlayerLeftStyle = """
{
    "embed": {
        "author": {
            "name": "{player} {multiplayer.player.left}",
            "icon_url": "{player_avatar_url}"
        },
        "color": "#E74C3C"
    }
}
"""
	# You can apply Markdown to individual components of the death message using the parameters below.
	# They will ultimately be compiled into the {death_message} substitution parameter, which you can use to form the final message in Discord.
	discordPlayerDeathCauseStyle = "{death_cause}"
	discordPlayerDeathNameStyle = "{player}"
	discordPlayerDeathSecondEntityStyle = "{second_entity}"
	discordPlayerDeathWeaponStyle = "{item}"
	# Player death message (configure parameters above)
	# Parameters: {player}, {death_message}
	discordPlayerDeathMessageStyle = """
{
    "embed": {
        "author": {
            "name": "{death_message}",
            "icon_url": "{player_avatar_url}"
        }
    }
}
"""
	# Player has made the advancement
	# Parameters: {player}, {chat.type.advancement.task}, {advancement}, {description}, {icon_url}
	discordPlayerAdvancementTaskStyle = """
{
    "embed": {
        "title": "**{advancement}**",
        "description": "{description}",
        "color": "#F1C40F",
        "author": {
            "name": "{player} {chat.type.advancement.task}",
            "icon_url": "{player_avatar_url}"
        },
        "thumbnail": {
            "url": "{icon_url}"
        }
    }
}
"""
	# Player has reached the goal
	# Parameters: {player}, {chat.type.advancement.goal}, {advancement}, {description}, {icon_url}
	discordPlayerAdvancementGoalStyle = """
{
    "embed": {
        "title": "**{advancement}**",
        "description": "{description}",
        "color": "#F1C40F",
        "author": {
            "name": "{player} {chat.type.advancement.goal}",
            "icon_url": "{player_avatar_url}"
        },
        "thumbnail": {
            "url": "{icon_url}"
        }
    }
}
"""
	# Player has completed the challenge
	# Parameters: {player}, {chat.type.advancement.challenge}, {advancement}, {description}, {icon_url}
	discordPlayerAdvancementChallengeStyle = """
{
    "embed": {
        "title": "**{advancement}**",
        "description": "{description}",
        "color": "#A700A7",
        "author": {
            "name": "{player} {chat.type.advancement.challenge}",
            "icon_url": "{player_avatar_url}"
        },
        "thumbnail": {
            "url": "{icon_url}"
        }
    }
}
"""
	# Chat message from player sent using /say command
	# Parameters: {player}, {message}
	discordSayCommandStyle = """
{
    "content": "`[{player}]` {message}"
}
"""
	# Chat message from player sent using /me command
	# Parameters: {player}, {message}
	discordMeCommandStyle = """
{
    "content": "* {player} {message}"
}
"""
	# Chat message from player sent using /me command (if webhook mode is enabled)
	# Parameters: {player}, {message}
	discordMeCommandWebhookStyle = """
{
    "content": "> {message}"
}
"""
	# Chat message from send using /tellraw @a command
	# Parameters: {message}
	discordTellrawCommandStyle = """
{
    "content": "{message}"
}
"""
	# Screenshot from player
	# Parameters: {player}, {screenshot_url}
	discordScreenshotMessageStyle = """
{
    "content": "`<{player}>`"
}
"""
	# Screenshot from player (if webhook mode is enabled)
	# Parameters: {player}, {screenshot_url}
	discordScreenshotMessageWebhookStyle = """
{
    "content": ""
}
"""
	# Server started message
	# Parameters: {discord_chat_mod.server.started}
	discordServerStartedMessageStyle = """
{
    "embed": {
        "description": "{discord_chat_mod.server.started} <t:{timestamp}:R>",
        "color": "#2ECC71"
    }
}
"""
	# Local server started message
	# Parameters: {discord_chat_mod.server.local_started}, {server_port}
	discordLocalServerStartedMessageStyle = """
{
    "embed": {
        "description": "{discord_chat_mod.server.local_started} <t:{timestamp}:R>",
        "color": "#2ECC71"
    }
}
"""
	# Server closed message
	# Parameters: {discord_chat_mod.server.closed}
	discordServerClosedMessageStyle = """
{
    "embed": {
        "description": "{discord_chat_mod.server.closed} <t:{timestamp}:R>",
        "color": "#E74C3C"
    }
}
"""
	# Pinned server status message when server is unavailable
	# Parameters: {discord_chat_mod.server.status.unavailable}
	discordPinnedStatusMessageServerUnavailableStyle = """
{
    "embed": {
        "description": "{discord_chat_mod.server.status.unavailable}",
        "color": "#E74C3C"
    }
}
"""
	# Pinned server status message when server is available but there are no players
	# Parameters: {discord_chat_mod.server.status.available}
	discordPinnedStatusMessageServerAvailableStyle = """
{
    "embed": {
        "description": "{discord_chat_mod.server.status.available}",
        "color": "#1F8B4C"
    }
}
"""
	# The characters separating player nicknames in the {player_list} parameter for the pinned status message style
	discordPinnedStatusMessagePlayerListDelimiter = "\n"
	# 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}"
	# 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"
    }
}
"""
	# The username displayed in Discord when forwarding a message from another guild
	# Parameters: {member}, {user}, {guild}
	discordGuildForwardedMessageUserNameStyle = "{user} ({guild})"

[[guilds]]
	# The [[guilds]] section is used to define the main and additional channels within a specific discord guild.
	# You can copy this section entirely and define another discord guild in the configuration.
	# In the guildId field you must specify the identifier of the discord guild to which all the channels listed below belong.
	guildId = ""
	# Discord channel ID for messaging with MineCraft
	# [!] Make sure the bot has access to the channel and all the permissions listed above.
	defaultChannelId = ""
	# Create a pinned message with the current server status and player list
	enablePinnedStatusMessage = true

	[guilds.channelOverrides]
		# If true, messages will still be sent to the main channel, but will also be duplicated to the specified channels.
		duplicateMessages = false
		# Overrides the default channel for pinned server status message. If empty, uses defaultChannelId.
		pinnedStatusMessageChannelId = ""
		# Overrides the default channel for player death messages. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending death messages to Discord
		deathsChannelId = ""
		# Overrides the default channel for player advancement messages. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending player advancement messages to Discord
		advancementsChannelId = ""
		# Overrides the default channel for server started/closed messages. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending server started/closed messages to Discord
		serverStartStopChannelId = ""
		# Overrides the default channel for player join/leave messages. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending player join/leave messages to Discord
		playerJoinLeaveChannelId = ""
		# Overrides the default channel for messages from players in Minecraft chat. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending messages from Minecraft players chat to Discord
		playerChatMessagesChannelId = ""
		# Overrides the default channel for screenshots sent from Minecraft. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending screenshots from Minecraft to Discord
		screenshotsChannelId = ""
		# Overrides the default channel for messages sent using /tellraw @a command. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending messages sent using /tellraw @a command to Discord
		tellrawChannelId = ""
		# Overrides the default channel for messages sent using /say command. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending messages send using /say command to Discord
		sayChannelId = ""
		# Overrides the default channel for messages sent using /me command. If empty, uses defaultChannelId.
		# Specify "-1" to disable sending messages send using /me command to Discord
		meChannelId = ""
