Skip to content

Support GIF banner URLs#472

Open
twoscott wants to merge 1 commit into
diamondburned:v3from
twoscott:dynamic-banner-type
Open

Support GIF banner URLs#472
twoscott wants to merge 1 commit into
diamondburned:v3from
twoscott:dynamic-banner-type

Conversation

@twoscott

Copy link
Copy Markdown
Contributor

Currently, Guild.BannerURL() returns the banner as a PNG URL no matter the circumstances. I'm not sure if banners were PNG-only when they were first added to Discord, but they can be animated now and we can use the same logic to determine if it's animated or not as we do with user avatars and guild icons.

@diamondburned

Copy link
Copy Markdown
Owner

I'm not sure if banners were PNG-only when they were first added to Discord

I think they are. I'm not sure if I would agree with this change, since it is an unnecessary breaking change: clients that don't support GIFs will now unexpectedly get a GIF sometimes.

@twoscott

Copy link
Copy Markdown
Contributor Author

I'm not sure if banners were PNG-only when they were first added to Discord

I think they are. I'm not sure if I would agree with this change, since it is an unnecessary breaking change: clients that don't support GIFs will now unexpectedly get a GIF sometimes.

That's fair, I'd think they'd use Guild.BannerURLWithType() if they wanted to ensure it's a specific type but I suppose this has been documented to return PNG only. We could add another method then perhaps? BannerURLAuto() or something along those lines? Obviously ...WithType(AutoImage) could be used but the available methods could lead someone to believe GIF banners aren't supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants