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

Add 4096 image size and jpeg format that discord supports #4031

Merged
merged 4 commits into from
Apr 12, 2020

Conversation

Roki100
Copy link
Contributor

@Roki100 Roki100 commented Apr 7, 2020

Please describe the changes this PR makes and why it should be merged:
Discord also allows to open avatars/icons in ?size=4096 and discord.js was supporting upto 2048 so im opening this pr, also format .jpeg is a thing and it was not listed in d.js

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@Roki100 Roki100 changed the title add 4096 avatar size that discord supports Add 4096 image size that discord supports Apr 7, 2020
@Roki100 Roki100 changed the title Add 4096 image size that discord supports Add 4096 image size and jpeg format that discord supports Apr 7, 2020
@didinele
Copy link
Member

didinele commented Apr 7, 2020

LGTM

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Jyguy Jyguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typings also need to be updated:

AllowedImageFormat
ImageSize

While you're at it, ImageExt should be removed completely as it is a duplicate of AllowedImageFormat. (changes in lines 2546 and 2551)

@Roki100 Roki100 requested a review from vladfrangu April 7, 2020 15:09
@SpaceEEC
Copy link
Member

The size of 4096 seems to be undocumented currently, see the Discord Developer Documentation - Reference - Image Formatting:

Image size can be any power of two between 16 and 2048.

This could be Discord not documenting a new feature, or something they are experimenting with, that may go away again.

@Roki100
Copy link
Contributor Author

Roki100 commented Apr 12, 2020

The size of 4096 seems to be undocumented currently, see the Discord Developer Documentation - Reference - Image Formatting:

Image size can be any power of two between 16 and 2048.

This could be Discord not documenting a new feature, or something they are experimenting with, that may go away again.

as always in discord docs, it was not updated as many things in the docs, after i told my friend that 4096 is valid he decided to make a pr and it got almost instantly merged (see: #1501)
(4096 is a thing for more than a year now)

@SpaceEEC
Copy link
Member

As usual.
I didn't see the PR over there yet.
We are good to go then!

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.

6 participants