[Fix] Incorrect ConnectionState of a DiscordSocketClient casted to IDiscordClient/BaseSocketClient
This commit is contained in:
@@ -178,12 +178,13 @@ namespace Discord.Rest
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public Task<BotGateway> GetBotGatewayAsync(RequestOptions options = null)
|
public Task<BotGateway> GetBotGatewayAsync(RequestOptions options = null)
|
||||||
=> ClientHelper.GetBotGatewayAsync(this, options);
|
=> ClientHelper.GetBotGatewayAsync(this, options);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public virtual ConnectionState ConnectionState => ConnectionState.Disconnected;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDiscordClient
|
#region IDiscordClient
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
ConnectionState IDiscordClient.ConnectionState => ConnectionState.Disconnected;
|
|
||||||
/// <inheritdoc />
|
|
||||||
ISelfUser IDiscordClient.CurrentUser => CurrentUser;
|
ISelfUser IDiscordClient.CurrentUser => CurrentUser;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ namespace Discord.WebSocket
|
|||||||
public override DiscordSocketRestClient Rest { get; }
|
public override DiscordSocketRestClient Rest { get; }
|
||||||
/// <summary> Gets the shard of this client. </summary>
|
/// <summary> Gets the shard of this client. </summary>
|
||||||
public int ShardId { get; }
|
public int ShardId { get; }
|
||||||
/// <summary> Gets the current connection state of this client. </summary>
|
/// <inheritdoc />
|
||||||
public ConnectionState ConnectionState => _connection.State;
|
public override ConnectionState ConnectionState => _connection.State;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override int Latency { get; protected set; }
|
public override int Latency { get; protected set; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
Reference in New Issue
Block a user