This change ensures that SocketUser.ActiveClients will not return null, but instead an empty set by default. This can happen if the client has not recieved a presence update for a user, or if the user is not cached.
This commit is contained in:
committed by
Christopher F
parent
911523d56f
commit
3ff4e3d506
@@ -40,7 +40,7 @@ namespace Discord.WebSocket
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public UserStatus Status => Presence.Status;
|
public UserStatus Status => Presence.Status;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IImmutableSet<ClientType> ActiveClients => Presence.ActiveClients;
|
public IImmutableSet<ClientType> ActiveClients => Presence.ActiveClients ?? ImmutableHashSet<ClientType>.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets mutual guilds shared with this user.
|
/// Gets mutual guilds shared with this user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user