DiscordSRV

DiscordSRV

86.8k Downloads

Put a zero-width space in %username% and %displayname% to prevent ping spam.

TheReverend403 opened this issue ยท 2 comments

commented

If a user has the same discord name as their Minecraft username, any message they send from Minecraft to Discord will (by default) ping that user if they are in a channel with the bot.

Obviously this is not ideal, so I propose putting a zero-width space before each character in the string before doing token replacements on %username% and %displayname%. This way, the username will appear normal on both ends of the link, but users shouldn't be pinged because the zero-width spaces cause the string to be different.

commented

How does your Discord-chat look like? There must be an @ in front of the username to get the user pinged in Discord!?

commented

Ah yes, my mistake. A message had an @ in it that I didn't notice.