Mc2Discord

Mc2Discord

50.4k Downloads

[Suggestion] Any way to prevent color codes showing up as "§7" when translated to discord? (example attached).

Gbergz opened this issue · 10 comments

commented

So,
Any way to prevent color codes showing up as "§7" when translated to discord? Looks pretty ugly 😅
image

Entries in the configs:

	# Global variables, Player variables and Advancement variables
	advancement = "${player_name} has made the advancement: §8[${advancement_title}]§7\n${advancement_description}."

Shows up as intended in-game but when translated to discord it shows like what's in the screenshot above.

- Gbergz

commented

Hi, modifying this config value doesn't impact the ingame message but only the discord one so you can remove the color code without any impact in-game. I still can remove colors codes from discord message if you really want to

PS: if you like this mod you can consider adding it in your server pack 🙃 it really support me

commented

Well if I remove the color code then it isn't colored ingame anymore like I wanted ..
That's why I reported this 😅

commented

The advancement value in the config only impact the Discord message. The Minecraft behavior isn't modified from the vanilla game.
Here's an exemple with the following config (same as your but with removed color code)

advancement = "${player_name} has made the advancement: [${advancement_title}]\n${advancement_description}."

image
image

So you can remove the color code in the configuration without impacting the ingame look
Denis

commented

Yes but I don't want to remove the color, I just don't want the color codes showing up in the discord message
image

like here, if possible. :)

commented

That message makes it gray and light gray in-game, but translated to discord its §8 and §7
Edit: The idea of the report was to check if it would be possible making §8 and §7 not show up in the discord message.

commented

I don't really understand why you don't want to remove them as the only effect they have is to be printed on discord

commented

Could you send a screen of the result with color ingame ?
It's not possible to have the advancement value in the config being on Minercaft
So the color code can't be processed by Minercaft as the message isn't displayed. Mc2Discord doesn't change the default ingame message.

The color code are already removed in some variables. This can be extended to remove § from whole messages but would limit people to use § in all discord. While it will never be used by Minecraft in the advancement case, you can just remove it.

Please send a screen from ingame with the gray and light gray.

commented

Ah right, sorry- probably should've mentioned that I have multiple servers using the same mod with different bots, sending messages across servers. Using relay_bot_messages = true. And a message coming from one server onto another will have the §8 and §7 colors showing there. But in discord it'll show like in the screenshot above with §8 and §7 included.

Edit: Here's a screenshot:
image

In discord:
image

commented

That's changing a lot of things 😄. The result is still the same. If I remove the color code on Discord, then the second server will recieve the message without the color code and won't color the message on the second server.

commented

Ah, oh well! Not much to be done then. Thanks for replying atleast :)