Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] ChatImage Support #211

Open
2 tasks done
Ashy8682 opened this issue Jan 22, 2024 · 6 comments
Open
2 tasks done

[Enhancement] ChatImage Support #211

Ashy8682 opened this issue Jan 22, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Ashy8682
Copy link

Ashy8682 commented Jan 22, 2024

Checks

Description

I've done some experimenting, and I suspect the bare minimum for this feature should be rather easy to implement.

Using a mod called ChatImage, it is possible to show images in Minecraft chat with nothing more than a url that links to an image, it even works with some GIFs.

I was able to send an image through Discord to Minecraft using MCDC and ChatImage, but I think it'd be really cool if MCDC was able to add the necessary text to the beginning and end of an image url sent in Discord automatically, such that ChatImage would recognize it.

I believe it would also be possible to show images sent in Minecraft using ChatImage in Discord, but currently it is not easily done because of the way ChatImage requires you to format your message.

I have yet to reach out to the developer of ChatImage about this. The mod does support other Discord bridge mods, but they are far less clean or user friendly than MCDC in my opinion.

Will add screenshots soon.

@Ashy8682 Ashy8682 added the enhancement New feature or request label Jan 22, 2024
@Xujiayao
Copy link
Owner

I found multiple Minecraft plugins/mods called ChatImage. Is https://github.com/kitUIN/ChatImage the one you are referring to?

@Ashy8682
Copy link
Author

Yes that's it.

@Xujiayao
Copy link
Owner

I was able to send an image through Discord to Minecraft using MCDC and ChatImage, but I think it'd be really cool if MCDC was able to add the necessary text to the beginning and end of an image url sent in Discord automatically, such that ChatImage would recognize it.

It does not seem sensible for MCDC to fulfil another mod's specification ([[CICode,url=<url>,name=<name>,nsfw=<nsfw>]]).

This is indeed more of a feature request for automatically decorating recognized image URLs with default parameters, and I suggest it be submitted on the ChatImage side.

@Xujiayao
Copy link
Owner

I believe it would also be possible to show images sent in Minecraft using ChatImage in Discord, but currently it is not easily done because of the way ChatImage requires you to format your message.

In fact, the Discord client has the ability to parse image links directly. While this may result in losing functionality for the nsfw and name parameters, providing the mentioned option would help improve ChatImage's compatibility with most mods.

The compatibility of local file:/// images with Discord is questionable.

Additionally, the format of ChatImageCode causes image URLs and hyperlinks to be incorrectly recognized and truncated, which is another issue that has to be addressed.

You can reference this issue for them when you submit an issue on their side.

image

@Ashy8682
Copy link
Author

Ashy8682 commented Jan 25, 2024

Thanks for checking it out, and sorry I never added screenshots.

It does not seem sensible for MCDC to fulfil another mod's specification ([[CICode,url=<url>,name=<name>,nsfw=<nsfw>]]).

I was thinking more along the lines of adding a custom message option for specifically images/links/embeds sent through Discord, so you could add the CIC yourself through MCDC.

This is indeed more of a feature request for automatically decorating recognized image URLs with default parameters, and I suggest it be submitted on the ChatImage side.

The creator of ChatImage said they will not make it recognize image URLs as it would be too resource intensive. (I don't remember where they said that, and I really don't believe it but that's what they said).

In fact, the Discord client has the ability to parse image links directly. While this may result in losing functionality for the nsfw and name parameters, providing the mentioned option would help improve ChatImage's compatibility with most mods.

This is what I meant when I said it wasn't really that easy due to the formatting, never expected this to be implemented, but I figured it may or may not be possible to recognize a CIC message and turn it into something that Discord can parse (an image link, maybe marked as ||spoiler|| if nsfw).

@Xujiayao
Copy link
Owner

I was thinking more along the lines of adding a custom message option for specifically images/links/embeds sent through Discord, so you could add the CIC yourself through MCDC.

Good idea! This should resolve Discord to Minecraft messages compatibility. ╰(*°▽°*)╯

As for Minecraft to Discord messages, I thought I would submit an issue on ChatImage side first to try and see if I can get better opinions from its developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants