DiscordChatChannelEmojiBehavior name behavior not sanitizing forwarded text & does not match discord's displayed emoji name.
mibby opened this issue ยท 0 comments
Expected behavior
No weird trailing symbol / whitespace character after some emojis & for the emoji name alias forwarded in-game to match discord's displayed emoji name.
Actual behavior
DiscordChatChannelEmojiBehavior: name
option does not seem to sanitize the forwarded text prompt sent from discord to in-game of any trailing whitespace / symbol characters.
For example, the top heart is sent on discord to in-game but has an invalid character after the emoji displayed. The bottom heart is sent in-game and displays fine both in-game & on discord.
Likewise for the emoji name
grabbed, discord -> in-game seems to send :slightly_smiling:
while when clicking on the emoji, it has the name of :slight_smile:
. This is causing the smile not to translate to emoji with EmojiChat but works & displays fine when written in-game for in-game & discord. This seems to affect a handful of different emojis, as if it's grabbing a secondary name assignment instead of the primary one that discord displays on click.
If you try both :slightly_smiling:
& :slight_smile:
, discord will show :slight_smile:
either way. What I was wondering was why DiscordSRV doesn't grab the first alias or rather the shown name (on discord hover/click) to send in-game. As if it's getting a complete list of emojis and picking the last in the alias list instead of the first. This is causing EmojiChat to not pick up the emoji due to the improper name being received and affects a handful of different emojis.
we use this emoji-java library for emojis
https://github.com/vdurmont/emoji-java/in that library, it has it's own json file of all the emojis with aliases, and the method we use (
parseToAliases
) grabs the first alias listed, so it's not necessarily our fault but it's definitely still an issue
Steps to reproduce
- Install, setup, and use DiscordSRV to bridge chat
- Install EmojiChat and associated resource pack
- Try to send an emoji such as heart or slight_smile both in-game & on discord
Server software and version
git-Paper-117 / git-Purpur-1537
Checks
- I am not using an outdated version of DiscordSRV.
- I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
Anything else
I couldn't find a place for emoji aliases last I checked. There's the shortcuts section in the EmojiChat config which I already have set, but that didn't pick up the word sent from DiscordSRV :slightly_smiling:
to turn it into :slight_smile:
shortcuts:
slight_smile:
- ':)'
- '(:'
- ':slightly_smiling:'
https://github.com/Vap0r1ze/EmojiChat/blob/master/plugin/src/main/resources/config.yml#L53
There's the list.txt file but that is for the order to map emojis to unicode and to add additional emojis if you've edited the unicode text images in the resource pack. You can't add aliases to that.
https://github.com/Vap0r1ze/EmojiChat/blob/master/plugin/src/main/resources/list.txt
There's also the automation/emojis.json
file but I think that was just pulled from discord to show all available emojis & aliases discord has. This file isn't touched or read on compilation of EmojiChat and doesn't exist in the .jar / resource folder.
https://github.com/Vap0r1ze/EmojiChat/blob/master/automation/emojis.json
As far as my understanding goes since last discussed, both issues may be a library issue with what DiscordSRV uses for emoji names. Since a handful of different emojis are affected, I believe DiscordSRV isn't using the proper first emoji name in the library list that discord uses for display name or that library is in the wrong order. As well as DiscordSRV itself not sanitizing emoji names so only the emoji name text is forwarded?
Reference: DiscordSRV support ticket #6722-woc