diff --git a/src/Discord.Net.WebSocket/BaseSocketClient.cs b/src/Discord.Net.WebSocket/BaseSocketClient.cs index 4ab149832..c33d4d84f 100644 --- a/src/Discord.Net.WebSocket/BaseSocketClient.cs +++ b/src/Discord.Net.WebSocket/BaseSocketClient.cs @@ -36,6 +36,11 @@ namespace Discord.WebSocket /// public abstract IActivity Activity { get; protected set; } + /// + /// Provides access to a REST-only client with a shared state from this client. + /// + public abstract DiscordSocketRestClient Rest { get; } + internal new DiscordSocketApiClient ApiClient => base.ApiClient as DiscordSocketApiClient; /// diff --git a/src/Discord.Net.WebSocket/DiscordShardedClient.cs b/src/Discord.Net.WebSocket/DiscordShardedClient.cs index fe8d899b3..bac06a26d 100644 --- a/src/Discord.Net.WebSocket/DiscordShardedClient.cs +++ b/src/Discord.Net.WebSocket/DiscordShardedClient.cs @@ -37,6 +37,11 @@ namespace Discord.WebSocket /// public override IReadOnlyCollection VoiceRegions => _shards[0].VoiceRegions; + /// + /// Provides access to a REST-only client with a shared state from this client. + /// + public override DiscordSocketRestClient Rest => _shards[0].Rest; + /// Creates a new REST/WebSocket Discord client. public DiscordShardedClient() : this(null, new DiscordSocketConfig()) { } /// Creates a new REST/WebSocket Discord client. diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 5da629436..48ce34d83 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -44,8 +44,10 @@ namespace Discord.WebSocket private RestApplication _applicationInfo; private bool _isDisposed; - /// Provides access to a REST-only client with a shared state from this client. - public DiscordSocketRestClient Rest { get; } + /// + /// Provides access to a REST-only client with a shared state from this client. + /// + public override DiscordSocketRestClient Rest { get; } /// Gets the shard of of this client. public int ShardId { get; } /// Gets the current connection state of this client.