Browse Source

WIP commit, update IActivity and IUser with missing types

pull/1237/head
Chris Johnston 6 years ago
parent
commit
04e5a981bc
3 changed files with 62 additions and 0 deletions
  1. +32
    -0
      src/Discord.Net.Core/Entities/Activities/IActivity.cs
  2. +10
    -0
      src/Discord.Net.Core/Entities/Users/IUser.cs
  3. +20
    -0
      src/Discord.Net.Core/Entities/Users/PremiumType.cs

+ 32
- 0
src/Discord.Net.Core/Entities/Activities/IActivity.cs View File

@@ -19,5 +19,37 @@ namespace Discord
/// The type of activity. /// The type of activity.
/// </returns> /// </returns>
ActivityType Type { get; } ActivityType Type { get; }
/// <summary>
/// Gets the Stream URL. Only used when <see cref="Type"/> is <see cref="ActivityType.Streaming"/>.
/// </summary>
/// <returns>
/// A string containing the URL to the stream.
/// </returns>
string Url { get; }
/// <summary>
/// Gets the unix timestamps for the start and/or end of the activity.
/// </summary>
/// <returns>
/// A <see cref="GameTimestamps"/> containing the start and end times, if specified.
/// </returns>
GameTimestamps Timestamps { get; }
/// <summary>
/// Gets the application Id for the game.
/// </summary>
ulong ApplicationId { get; }
/// <summary>
/// Gets what the user is currently doing.
/// </summary>
string Details { get; }
/// <summary>
/// Gets the user's current party status.
/// </summary>
string State { get; }
//TODO finish docs
GameParty Party { get; }
GameAsset Assets { get; }
GameSecrets Secrets { get; }
bool Instance { get; }
int Flags { get; }
} }
} }

+ 10
- 0
src/Discord.Net.Core/Entities/Users/IUser.cs View File

@@ -112,5 +112,15 @@ namespace Discord
/// contains the DM channel associated with this user. /// contains the DM channel associated with this user.
/// </returns> /// </returns>
Task<IDMChannel> GetOrCreateDMChannelAsync(RequestOptions options = null); Task<IDMChannel> GetOrCreateDMChannelAsync(RequestOptions options = null);

/// <summary>
/// The flags on a user's account
/// TODO we could probably have extension methods for determining these
/// </summary>
int Flags { get; }
/// <summary>
/// The type of Nitro subscription
/// </summary>
PremiumType? PremiumType { get; }
} }
} }

+ 20
- 0
src/Discord.Net.Core/Entities/Users/PremiumType.cs View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Discord
{
public enum PremiumType
{
/// <summary>
/// Includes app perks like animated emojis and avatars, but not games.
/// </summary>
NitroClassic = 1,
/// <summary>
/// Includes app perks as wel as the games subscription service.
/// </summary>
Nitro = 2
}
}

Loading…
Cancel
Save