Skip to content

Added new invite properties

Created by: Neuheit

Summary

Implements the new DiscordInvite properties as mentioned in issue #442 (closed).

Details

Edited the GetInvite and GetInviteAsync methods to take an additional optional parameter "withCounts". If set to true, it will return the invite object with both the approximate presence (online members) count and approximate member count of the guild. The bool is then converted to a query string that is sent depending on whether it's null or not.

Also added a DiscordUser property representing the invited user and a new enum called TargetUserType, which is basically what the inviter is doing in the voice channel. Currently, the only action is live streaming.

Changes proposed

  • Added an additional parameter to GetInvite() and GetInviteAsync().
  • Added the 4 new invite properties.
  • Created a new enum representing the state of one of the invite properties.
  • Edited the ApiClient's GetInvite method to build a query string for the parameter, and have it sent depending on whether it's null or not.

Merge request reports

Loading