feature: Remove obsolete sync voice regions methods and properties (#1848)
This commit is contained in:
@@ -36,9 +36,6 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
public override IReadOnlyCollection<ISocketPrivateChannel> PrivateChannels => GetPrivateChannels().ToReadOnlyCollection(GetPrivateChannelCount);
|
||||
public IReadOnlyCollection<DiscordSocketClient> Shards => _shards;
|
||||
/// <inheritdoc />
|
||||
[Obsolete("This property is obsolete, use the GetVoiceRegionsAsync method instead.")]
|
||||
public override IReadOnlyCollection<RestVoiceRegion> VoiceRegions => _shards[0].VoiceRegions;
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to a REST-only client with a shared state from this client.
|
||||
@@ -263,11 +260,6 @@ namespace Discord.WebSocket
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("This method is obsolete, use GetVoiceRegionAsync instead.")]
|
||||
public override RestVoiceRegion GetVoiceRegion(string id)
|
||||
=> _shards[0].GetVoiceRegion(id);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async ValueTask<IReadOnlyCollection<RestVoiceRegion>> GetVoiceRegionsAsync(RequestOptions options = null)
|
||||
{
|
||||
@@ -431,11 +423,15 @@ namespace Discord.WebSocket
|
||||
=> Task.FromResult<IUser>(GetUser(username, discriminator));
|
||||
|
||||
/// <inheritdoc />
|
||||
Task<IReadOnlyCollection<IVoiceRegion>> IDiscordClient.GetVoiceRegionsAsync(RequestOptions options)
|
||||
=> Task.FromResult<IReadOnlyCollection<IVoiceRegion>>(VoiceRegions);
|
||||
async Task<IReadOnlyCollection<IVoiceRegion>> IDiscordClient.GetVoiceRegionsAsync(RequestOptions options)
|
||||
{
|
||||
return await GetVoiceRegionsAsync().ConfigureAwait(false);
|
||||
}
|
||||
/// <inheritdoc />
|
||||
Task<IVoiceRegion> IDiscordClient.GetVoiceRegionAsync(string id, RequestOptions options)
|
||||
=> Task.FromResult<IVoiceRegion>(GetVoiceRegion(id));
|
||||
async Task<IVoiceRegion> IDiscordClient.GetVoiceRegionAsync(string id, RequestOptions options)
|
||||
{
|
||||
return await GetVoiceRegionAsync(id).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
internal override void Dispose(bool disposing)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user