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/Implement various invite-related behaviors #1023

Merged
merged 6 commits into from
Apr 29, 2018

Conversation

Still34
Copy link
Member

@Still34 Still34 commented Apr 8, 2018

Summary

This PR does 3 things.

  1. Fix IDiscordClient.GetInviteAsync behaviour

    • Previously, this method would have returned much less information than what the API provided. This is fixed by changing the return type from RestInvite to RestInviteMetadata.
  2. Add the ability to get the approximated member/presence count provided by the API

    • The current design is debatable; I feel like we should just always return this count instead of having to add a new parameter asking whether the user want the count included.
  3. Deprecate the IInvite.AcceptAsync method

    • The accept endpoint has been deprecated by Discord around the end of March.

Hsu Still added 3 commits April 8, 2018 14:03
- Previously, the GetInviteAsync method would return null since it couldn't be parsed as a simple RestInvite object. The object should be a RestInviteMetadata instead.
@Still34
Copy link
Member Author

Still34 commented Apr 8, 2018

Probably shouldn't create an extra arg and use SendJsonAsync, but use in-url style param like AddBanAsync. Will fix later.

@Still34 Still34 changed the title Support for member count via invite & fix IDiscordClient.GetInviteAsync Fix/Implement various invite-related behaviors Apr 13, 2018
@foxbot foxbot merged commit 7022149 into discord-net:dev Apr 29, 2018
FiniteReality pushed a commit to FiniteReality/Discord.Net that referenced this pull request May 5, 2018
* Initial support for invite member count arg

* Fix IDiscordClient#GetInviteAsync behavior

- Previously, the GetInviteAsync method would return null since it couldn't be parsed as a simple RestInvite object. The object should be a RestInviteMetadata instead.

* Fix methods that didn't comply with the interface

* Change with_counts REST behaviour

* Remove unnecessary JSON prop

* Remove AcceptAsync
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