-
-
Notifications
You must be signed in to change notification settings - Fork 737
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
Add BaseSocketClient object. #773
Conversation
DiscordSocketClient and DiscordShardedClient's shared members now exist in this abstract class.
Remove extraneous overloads.
Style cleanups.
Style cleanup.
@@ -67,7 +67,7 @@ internal override void Dispose(bool disposing) | |||
|
|||
public Task StartAsync() => _connection.StartAsync(); | |||
public Task StopAsync() => _connection.StopAsync(); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wat.
(Same goes for the other line in this file.)
Remove all that superfluous whitespace ( |
Looks good, but maybe we can leave |
Sounds good to me. |
* Add BaseDiscordClient. Add various missing RequestOptions args. DiscordSocketClient and DiscordShardedClient's shared members now exist in this abstract class. * Add ShardReady event. * Style consistency. Remove extraneous overloads. Remove extraneous overloads. * Add BaseSocketClient#DownloadUsersAsync(). Style cleanups. * Add ShardLatencyUpdated event. Style cleanup. * Hook LatencyUpdated for ShardedClient. * Begone whitespace. * I'm good at this, I swear. >_> * Add back DiscordShardedClient.UserPresenceUpdated * Add ObsoleteAttribute * Removing the UserPresenceUpdated event.
Breaking changes:
- Removed leftoverDiscordShardedClient.UserPresenceUpdated
event.(Will be done on next major release)
Additions:
Minor:
-- Added optional RequestOptions argument that was missing from various methods.
-- Added docstrings for all events.
There is no currently existing bridge between DiscordSocketClient and DiscordShardedClient, leaving users to duplicate all websocket client functionality between the two if they wish to abstract code that should be shared to a BCL, or for addon developers that wish to support both client types out of the box.
While it makes logical sense that this wasn't implemented previously as DiscordShardedClient isn't technically a client itself, but a wrapper for multiple DiscordSocketClients, that comes at an unfortunate expense of usability for accessing events or methods only supported via websockets.