kitUIN / ChatImage

A Minecraft Mod Which Could Show Image In Chat Line
https://chatimage.kituin.fun
32 stars 5 forks source link

Questions about the compatibility of ChatImage with other mods #27

Closed Xujiayao closed 1 month ago

Xujiayao commented 7 months ago

Relates to Xujiayao/MC-Discord-Chat#211.

Hi. Writing in English here to facilitate language internationalization.

Please take a look at the referenced issue to get an understanding of the case. Several problems are mentioned there, and I would like to request if anything could be done on the ChatImage side.

Thank you.

kitUIN commented 7 months ago

我看这位Ashy8682的说法是添加一个中间件用于将discord中的图片消息转为CICode发送到mc公屏中?

请问这是否存在难点?

Xujiayao commented 7 months ago

image

Issue 里后面有提到说 Discord to Minecraft 可以借 MCDC 自定义配置解决,因此这块 ChatImage 不需要进行任何改动,而是 Minecraft to Discord 需要想办法。

https://github.com/Xujiayao/MC-Discord-Chat/issues/211#issuecomment-1905560195

可以从这个 comment 开始看。

kitUIN commented 7 months ago

Minecraft to Discord过程中

需要拆分CICode,提取出url

如果是file:///那就需要调用上传了吧 若服务器安装了ChatImage,则会有图片缓存在内存中

关于拆分CICode可以参考这段code

至于本地图片的话,有何好的想法?

Xujiayao commented 7 months ago

我是觉得一个 mod 专门为了符合另一个 mod 的格式规范而进行修改可能并不是最实际的方法。要知道这样做可能会使 mod 代码变得越来越复杂,毕竟一旦接受一个请求,就会有无数类似请求。因此我主要希望探讨是否有一种更 general 的解决方案,这样后来者也不需要对此 mod 进行额外适配,这样大家也都受益嘛。<(^-^)>

kitUIN commented 7 months ago

添加我QQ:1585447424 细聊吧