Xujiayao / Discord-MC-Chat

Discord-MC-Chat (DMCC), formerly known as MC-Discord-Chat and MCDiscordChat (MCDC), is a practical and powerful Fabric and Quilt Minecraft <> Discord chat bridge inspired by BRForgers/DisFabric
https://blog.xujiayao.com/posts/4ba0a17a/
MIT License
65 stars 35 forks source link

[Bug] Placeholders not filled #27

Open SaiCode-DEV opened 2 years ago

SaiCode-DEV commented 2 years ago

Existing Issues Searched

Simplest Environment Tested

Docs and Changelog Read

Java Version

JAVA 17

Minecraft Version

1.18.2

MCDiscordChat Version

MCDiscordChat-1.18-2.0.0-alpha.1.jar

Description

Placeholders not getting filled

image

image

To Reproduce

installed mod - joined game

Log

console log normal (no errors)

Config

{
  "generic": {
    "useEngInsteadOfChin": true,
    "botToken": "[deleted]",
    "botPlayingStatus": "Minecraft",
    "botListeningStatus": "",
    "webhookUrl": "https://discord.com/api/webhooks/[deleted]",
    "channelId": "844241007511339038",
    "consoleLogChannelId": "844241242278985829",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastCommandExecution": true,
    "announceHighMspt": true,
    "msptLimit": 50,
    "excludedCommands": [
      "/tell"
    ],
    "adminsIds": []
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP"
  },
  "textsZH": {
    "serverStarted": ".",
    "serverStopped": "..",
    "joinServer": "...",
    "leftServer": "....",
    "deathMessage": "**%deathmessage%**",
    "advancementTask": "**%playername% 达成了进度 [%advancement%]**",
    "advancementChallenge": "**%playername% 完成了挑战 [%advancement%]**",
    "advancementGoal": "**%playername% 达成了目标 [%advancement%]**",
    "highMspt": "**服务器 MSPT (%mspt%) 高于 %msptLimit%!**",
    "consoleLogMessage": "**[%timestamp%] [INFO]:** %message%"
  },
  "textsEN": {
    "serverStarted": ":white_check_mark: **Server started!**",
    "serverStopped": ":octagonal_sign: **Server stopped!**",
    "joinServer": "**%playername% joined the game**",
    "leftServer": "**%playername% left the game**",
    "deathMessage": "**%deathmessage%**",
    "advancementTask": "**%playername% has made the advancement [%advancement%]**",
    "advancementChallenge": "**%playername% has completed the challenge [%advancement%]**",
    "advancementGoal": "**%playername% has reached the goal [%advancement%]**",
    "highMspt": "**Server MSPT (%mspt%) is above %msptLimit%!**",
    "consoleLogMessage": "**[%timestamp%] [INFO]:** %message%"
  }
}
Xujiayao commented 2 years ago

The name of placeholders of MCDC v2 has changed. Please replace your existing config with the following config, and then customize it yourself:

  "textsZH": {
    "serverStarted": "**服务器已启动!**",
    "serverStopped": "**服务器已关闭!**",
    "joinServer": "**%playerName% 加入了服务器**",
    "leftServer": "**%playerName% 离开了服务器**",
    "deathMessage": "**%deathMessage%**",
    "advancementTask": "**%playerName% 达成了进度 [%advancement%]**",
    "advancementChallenge": "**%playerName% 完成了挑战 [%advancement%]**",
    "advancementGoal": "**%playerName% 达成了目标 [%advancement%]**",
    "highMspt": "**服务器 MSPT (%mspt%) 高于 %msptLimit%!**",
    "consoleLogMessage": "[%time%] [INFO] %message%"
  },
  "textsEN": {
    "serverStarted": "**Server started!**",
    "serverStopped": "**Server stopped!**",
    "joinServer": "**%playerName% joined the game**",
    "leftServer": "**%playerName% left the game**",
    "deathMessage": "**%deathMessage%**",
    "advancementTask": "**%playerName% has made the advancement [%advancement%]**",
    "advancementChallenge": "**%playerName% has completed the challenge [%advancement%]**",
    "advancementGoal": "**%playerName% has reached the goal [%advancement%]**",
    "highMspt": "**Server MSPT (%mspt%) is above %msptLimit%!**",
    "consoleLogMessage": "[%time%] [INFO] %message%"
  }
SaiCode-DEV commented 2 years ago

Ahhh... That explains it all... Thank you!

P.s. consider adding a "upgrade config" function which changes the stings if changed On 11 Apr 2022, 11:43 +0200, Jason Xu @.***>, wrote:

The name of placeholders of MCDC v2 has changed, please replace your existing config with the following config, and then customize it yourself: "textsZH": {

"serverStarted": "服务器已启动!",

"serverStopped": "服务器已关闭!",

"joinServer": "%playerName% 加入了服务器",

"leftServer": "%playerName% 离开了服务器",

"deathMessage": "%deathMessage%",

"advancementTask": "%playerName% 达成了进度 [%advancement%]",

"advancementChallenge": "%playerName% 完成了挑战 [%advancement%]",

"advancementGoal": "%playerName% 达成了目标 [%advancement%]",

"highMspt": "服务器 MSPT (%mspt%) 高于 %msptLimit%!",

"consoleLogMessage": "[%time%] [INFO] %message%"

},

"textsEN": {

"serverStarted": "Server started!",

"serverStopped": "Server stopped!",

"joinServer": "%playerName% joined the game",

"leftServer": "%playerName% left the game",

"deathMessage": "%deathMessage%",

"advancementTask": "%playerName% has made the advancement [%advancement%]",

"advancementChallenge": "%playerName% has completed the challenge [%advancement%]",

"advancementGoal": "%playerName% has reached the goal [%advancement%]",

"highMspt": "Server MSPT (%mspt%) is above %msptLimit%!",

"consoleLogMessage": "[%time%] [INFO] %message%"

} — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Xujiayao commented 2 years ago

P.s. consider adding a "upgrade config" function which changes the stings if changed

Alright, I'll look into it. Btw thanks for your support!

Xujiayao commented 2 years ago

P.s. consider adding a "upgrade config" function which changes the stings if changed

Alright, I'll look into it. Btw thanks for your support!

Added in latest commit 25730b6bf657ecc372c635b1de2268402b4508cd

Also, if you want latest features, you can find the latest build JAR files at GitHub Actions.