destruc7i0n / shulker

A Discord to Vanilla Minecraft Chat Gateway
ISC License
135 stars 47 forks source link

Improved regex for user mentions and TELLRAW #54

Closed TheZackCodec closed 4 years ago

TheZackCodec commented 4 years ago

Tested on 2 x 24/7 servers

Does not conflict with pull request #55

Details:

Verified at https://regexr.com/ and in live server image

The example below is where I had to use this. The blue text when shift-clicked in game will populate the Minecraft chat prompt with discordusername#delimiter so the Minecraft user does not have to type out an entire desired discord user's username and delimiter manually to mention them.

Here is the TELLRAW used to test this "MINECRAFT_TELLRAW_TEMPLATE": "[\"\",{\"text\":\"Discord \",\"bold\":true,\"color\":\"blue\"},{\"text\":\"<\"},{\"text\":\"%username%\",\"color\":\"aqua\",\"insertion\":\"@%username%#%discriminator% \"},{\"text\":\"> %message%\"}]",

This is what it looks like in game. image

and in discord image

If you like my template and want to add it to the repo as the default or as a suggestion in the readme, let me know and i'll add it to this pull request.

destruc7i0n commented 4 years ago

Sorry for the late response, though this LGTM!