qeled / discordie

Predictable JavaScript abstractions for Discord API.
https://qeled.github.io/discordie/
BSD 2-Clause "Simplified" License
190 stars 45 forks source link

AvatarURL webp #93

Closed PhunStyle closed 7 years ago

PhunStyle commented 7 years ago

Hey there,

image

Was wondering if "fmt" could be changed from jpg to webp to support transparency. Apparently discord stores them in webp now.

https://cdn.discordapp.com/avatars/119807353439649796/8bfbdb5291c55a1ea802302aa4038e6c.jpg

https://cdn.discordapp.com/avatars/119807353439649796/8bfbdb5291c55a1ea802302aa4038e6c.webp

-Phun

bluethefoxyt commented 7 years ago

it does @PhunStyle

bluethefoxyt commented 7 years ago

you dont need to ask them to edit it because it automaticly does it @PhunStyle

PhunStyle commented 7 years ago

image

Are you sure @kessanro ? The code explicitly only differentiates between jpg and gif, not webp/png.

bluethefoxyt commented 7 years ago

i use similler code and it works for me @PhunStyle

bluethefoxyt commented 7 years ago

but if you want to allow gift(i dont) you might need to check the documentation https://qeled.github.io/discordie/#/docs/IUser?p=IUser%23registeredAt&_k=furdu7

PhunStyle commented 7 years ago

IUser.avatarURL always returns jpg/gif for me, not transparent webp, even though i have a transparent avatar.

bluethefoxyt commented 7 years ago

ok discordie does not support transparent images you would either need to make your own lib or use a diffrent one tht might chanche in the future thow @PhunStyle here is a link to my server https://discord.gg/NdsBY6f

PhunStyle commented 7 years ago

Yeah the whole point of this issue was to ask the author of the lib to implement a change to .avatarURL so it does support transparent images...

LynnAU commented 7 years ago

This can probably be closed now as the dev branch has the above commit.

PhunStyle commented 7 years ago

Awesome, thanks qeled ♥