* Update deps, fix test warnings.
* Support ns2.0
* Fix typo
* Remove ns1.1 support
* Net.Http and Net.Websockets.Client are not needed in ns2.0
* Move to net46 per volt
* Remove ns1.3 constants
- Removed unnecessary parameter in SocketVoiceServer
- Moved SocketVoiceServer into Entities/Voice
- Fixed a bug where trying to download the cached guild would throw
- Fixed a potential bug where Discord might not give us a port when
connecting to voice
* Expose VoiceServerUpdate events
* Amend based on feedback
* Move this out of guild entity
* Fix namespace issue
* Adjust based on feedback #2
* Use cacheable instead
* Change based on feedback
* 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
* Set usage of TokenType.User as an error rather than a warning.
* Remove commented sections and #pragma's
Additionally, changes use of ReadMessages to ViewChannel since that Obsolete was also suppressed by the pragma
This resolves#938 and #883
Note: This fix is not 'verified' in production (I waited over a week for
another full Discord outage and never encountered one), but I do have it
on record from b1nzy that Discord may send an OP9 with `{"d": true}`
during outages, so this would appear to be the proper fix.
The removed code seems to have been leftover from when ConnectionManager
was rewritten and never finished.
This resolves#931
As part of this change, StreamingType has been refactored to realign
with how Discord seems to define the 'type' field on activities now.
StreamType is renamed to ActivityType, and the following properties have
been changed:
- NotStreaming -> Playing
- Twitch -> Streaming
Additionally, the StreamType property/parameter has been removed from
StreamingGame, and moved up a scope to Game.
Normal Games may now set their type, to line up with changes in
Discord's official clients.
This change resolves#916
Discord requires the {"type": 0} payload for all non-streaming
activities. This change fixes a bug where name-only games would fail to
include this payload, causing the presence change to be discarded by
Discord.
* Add API-level support for Rich Presences
* Add library-level support for Game presences
* Add model conversions for outgoing+incoming rich presences
* Refactored Game into Activities
* Integrated Activities with user entities
rebase hell from 5f3cb947a9
* Fix JSON converters for Activities
* Finish rebase, activity should be set on BaseSocketClient
* Use ApplicationId to define a rich presence
* Added SetActivityAsync to Base and Sharded Socket clients
* Remove public parameterless Game constructor
* Remove GameAssets, refactored to GameAsset
* Hide constructors for types that should be read-only
* Revert changes to Discord.Net.sln
got damned visual studio caching
* Refactor GameParty to use dedicated current/capacity values
Per feedback from @khionu
* Made GetOrCreateUser always call AddRef and added check to PRESENCE_UPDATE to avoid readding users who have been removed from guilds
* Removed AddRef as per dev guild discussion
The previous commit prevents any connections, since the initial presence update is sent while the client is still in the 'connecting' state, rather than the 'connected' state.
This resolves the original issue by preventing a nullref, and the more recent issue by only throwing a detailed exception when the CurrentUser is null (the client isn't logged in).
This prevents a later, less detailed nullref, when attempting to set the CurrentUser's presence data.
This also removes a redundant CurrentUser assignment in the SetGameAsync method, since this will be set later on in the SendStatusAsync method.