[ifcbrk] feature: Implement Client Status Support (#1247)
* Implement Client Status Support Adds support for using the client_status as sent as part of the Presence model. This value can be used to determine if a user is active on the native desktop app, the mobile app, or the website. * lint: whitespace in IPresence * Remove breaking change to IPresence interface with a note for 2.1 * update comment to not reference 2.1 * re-add interface break to IPresence * add example payload for client_status * use inline declaration for Enum.TryParse
This commit is contained in:
committed by
Christopher F
parent
c870e672a2
commit
9da11b4184
21
src/Discord.Net.Core/Entities/Users/ClientType.cs
Normal file
21
src/Discord.Net.Core/Entities/Users/ClientType.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Discord
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the types of clients a user can be active on.
|
||||
/// </summary>
|
||||
public enum ClientType
|
||||
{
|
||||
/// <summary>
|
||||
/// The user is active using the mobile application.
|
||||
/// </summary>
|
||||
Mobile,
|
||||
/// <summary>
|
||||
/// The user is active using the desktop application.
|
||||
/// </summary>
|
||||
Desktop,
|
||||
/// <summary>
|
||||
/// The user is active using the web application.
|
||||
/// </summary>
|
||||
Web
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
/// <summary>
|
||||
@@ -13,5 +15,9 @@ namespace Discord
|
||||
/// Gets the current status of this user.
|
||||
/// </summary>
|
||||
UserStatus Status { get; }
|
||||
/// <summary>
|
||||
/// Gets the set of clients where this user is currently active.
|
||||
/// </summary>
|
||||
IImmutableSet<ClientType> ActiveClients { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user