Skip to content

Conversation

@vaporoxx
Copy link
Contributor

@vaporoxx vaporoxx commented Oct 4, 2020

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

Client#emojis and Guild#emojis both return a GuildEmojiManager, however the current code base does not account for former not having a valid guild property. client.emojis.create(...) before resulted in DiscordAPIError: 405: Method Not Allowed, this PR aims to fix that by checking if a guild is present before using it for methods and throwing a custom error.

Consideration

There's also the option to create two separate classes for Client#emojis and Guild#emojis, I've decided to take this approach for now but I'm open to suggestions.

Status

  • Code changes have been tested against the Discord API
  • I know how to update typings and have done so

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.

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