Refactor Games, support reading Rich Presences (#877)
* Add API-level support for Rich Presences * Add library-level support for Game presences * Add model conversions for outgoing+incoming rich presences * Refactored Game into Activities * Integrated Activities with user entities rebase hell from 5f3cb947a92f4fd01cc4df47ca548180036b47f3 * Fix JSON converters for Activities * Finish rebase, activity should be set on BaseSocketClient * Use ApplicationId to define a rich presence * Added SetActivityAsync to Base and Sharded Socket clients * Remove public parameterless Game constructor * Remove GameAssets, refactored to GameAsset * Hide constructors for types that should be read-only * Revert changes to Discord.Net.sln got damned visual studio caching * Refactor GameParty to use dedicated current/capacity values Per feedback from @khionu
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Discord.WebSocket
|
||||
/// <summary> Gets the estimated round-trip latency, in milliseconds, to the gateway server. </summary>
|
||||
public abstract int Latency { get; protected set; }
|
||||
public abstract UserStatus Status { get; protected set; }
|
||||
public abstract Game? Game { get; protected set; }
|
||||
public abstract IActivity Activity { get; protected set; }
|
||||
|
||||
internal new DiscordSocketApiClient ApiClient => base.ApiClient as DiscordSocketApiClient;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Discord.WebSocket
|
||||
public abstract Task StopAsync();
|
||||
public abstract Task SetStatusAsync(UserStatus status);
|
||||
public abstract Task SetGameAsync(string name, string streamUrl = null, StreamType streamType = StreamType.NotStreaming);
|
||||
public abstract Task SetActivityAsync(IActivity activity);
|
||||
public abstract Task DownloadUsersAsync(IEnumerable<IGuild> guilds);
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user