ChatImage icon indicating copy to clipboard operation
ChatImage copied to clipboard

Not stripping url arguments for discord images

Open oskarbukovsky opened this issue 1 year ago • 11 comments

It looks like chatimage ignore parameters in url and for discord images it doesnt work image

oskarbukovsky avatar Jul 15 '24 17:07 oskarbukovsky

could you give me raw url?

kitUIN avatar Jul 15 '24 19:07 kitUIN

Examples:

image https://media.discordapp.net/attachments/1243302804802633728/1263505132276940860/image.png?ex=669a7a5a&is=669928da&hm=9ee4b06fc189006b7a81e9730649a4cea750cc87d12149ec18008466c5431512&=&format=webp&quality=lossless

image https://cdn.discordapp.com/attachments/1243302804802633728/1263506347371135048/IMG_20240718_164152.jpg?ex=669a7b7c&is=669929fc&hm=05e84327f7171b3ce5fe3b5c42e1ecc7a74bc50988228faef40e8a75e6b08cf4&

image

image The last is a result of /chatimage url https://media.discordapp.net/attachments/1243302804802633728/1263505132276940860/image.png?ex=669a7a5a&is=669928da&hm=9ee4b06fc189006b7a81e9730649a4cea750cc87d12149ec18008466c5431512&=&format=webp&quality=lossless

oskarbukovsky avatar Jul 18 '24 14:07 oskarbukovsky

minecraft version is ?

also,we don't support .webp image

kitUIN avatar Jul 19 '24 14:07 kitUIN

Minecraft 1.20.1 Forge 47.3.1 ChatImage 1.2.4+1.20.1+forge

Ok, but one is .jpg, also why not?

oskarbukovsky avatar Jul 19 '24 14:07 oskarbukovsky

now, not support url with parameters a better way is to use CICode maybe it has a bug

kitUIN avatar Jul 19 '24 14:07 kitUIN

Any chance to adding suport for parameters to mod? We are using discordsrv and it will be super cool to not switch windows and enjoy image content ingame.

oskarbukovsky avatar Jul 19 '24 15:07 oskarbukovsky

It is very difficult to determine the valid length of the url when the url with parameters is in a sentence.

A better way is for discordsrv to support CICode usage

kitUIN avatar Jul 19 '24 15:07 kitUIN

Why just not to look at url as one word from http/etc. and try first if it is a valid image response else use current behavior?

oskarbukovsky avatar Jul 19 '24 15:07 oskarbukovsky

I'll try to make feature suggestion od discordsrv github, but i think not that much people will use CICode functionality. So probably time to find some workaround on discord to download and upload images elsewhere and send link to them into channel as bot, idk :(

//Why am i stupid, it will not help on discordsrv supporting cicode

oskarbukovsky avatar Jul 19 '24 15:07 oskarbukovsky

I'll try to implement a url with parameters

kitUIN avatar Jul 19 '24 15:07 kitUIN

After 2 days learning discordjs from scratch, it's working what i needed đŸ˜… Such a pain, but good excuse to learn something new

oskarbukovsky avatar Aug 29 '24 20:08 oskarbukovsky

Support in 1.3.0

kitUIN avatar Dec 05 '24 02:12 kitUIN