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
61 stars 34 forks source link

[Enhancement] Placeholder API support #37

Open Bizzonium opened 2 years ago

Bizzonium commented 2 years ago

Checks

Description

https://placeholders.pb4.eu/

Xujiayao commented 2 years ago

I will look into this feature after the 1.19 release.

Xujiayao commented 2 years ago

Not necessary, complicated, all code needs to be rewritten.

unilock commented 7 months ago

I think it would be quite a lot more convenient for the user to be able to use TextPlaceholderAPI instead of raw JSON in the config, for the few settings that enforce it. It would also be convenient to have access to the other placeholders exposed by said API.

Would you at least be willing to consider a PR that implements / makes use of TextPlaceholderAPI, if one were made?

Xujiayao commented 7 months ago

I think it would be quite a lot more convenient for the user to be able to use TextPlaceholderAPI instead of raw JSON in the config, for the few settings that enforce it. It would also be convenient to have access to the other placeholders exposed by said API.

Would you at least be willing to consider a PR that implements / makes use of TextPlaceholderAPI, if one were made?

Yes, I have seen many issues mentioning this, as MCDC is incompatible with some mods due to its use of its own method for parsing messages. It would certainly be best if there were any PRs to support it, as long as all existing MCDC functions are retained.

I am not very available at the moment, so PRs and non-urgent issues may not be reviewed promptly.

Xujiayao commented 7 months ago

This is confirmed to be a feature that MCDC v3 will support.

unilock commented 7 months ago

That's great! I did try to implement it myself a few weeks ago, but determined I wasn't familiar enough with the codebase to implement TextPlaceholderAPI alongside the JSON-based config that was already present.

Regardless, here's my WIP fork, if you're interested: https://github.com/unilock/MC-Discord-Chat/commit/11285063066911e7c8f63d2a73eb780f456308ed

Xujiayao commented 7 months ago

OK, thanks for providing it. I'll look into it when I start developing v3. You may submit a Draft PR if you prefer to be given credit for contribution.

Apologize for letting you see my shit mountain code about formatting messages lmao. That's why I don't want to touch it (as long as it works).