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

fix(GuildEmojiManager): throw an error if image resolving fails #3934

Merged

Conversation

SpaceEEC
Copy link
Member

Please describe the changes this PR makes and why it should be merged:

This PR fixes #3933.

The method was recursing endlessly if anything falsy (such as omitting the parameter) was passed as attachment.

I moved the DataResolver#resolveImage call to the top of the method and made the method throw an error (REQ_RESOURCE_TYPE) if resolving failed.

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.

src/managers/GuildEmojiManager.js Outdated Show resolved Hide resolved
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.

Running Guild.emojis.create() without any parameters ends with the process crashing due to heap out of memory
3 participants