Browse Source

Expose the details field in the Game model

pull/1237/head
Chris Johnston 6 years ago
parent
commit
813f8b37fe
2 changed files with 12 additions and 1 deletions
  1. +5
    -1
      src/Discord.Net.Core/Entities/Activities/Game.cs
  2. +7
    -0
      src/Discord.Net.Core/Entities/Activities/IActivity.cs

+ 5
- 1
src/Discord.Net.Core/Entities/Activities/Game.cs View File

@@ -14,6 +14,8 @@ namespace Discord
public ActivityType Type { get; internal set; }
/// <inheritdoc/>
public ActivityProperties Flags { get; internal set; }
/// <inheritdoc/>
public string Details { get; internal set; }

internal Game() { }
/// <summary>
@@ -21,10 +23,12 @@ namespace Discord
/// </summary>
/// <param name="name">The name of the game.</param>
/// <param name="type">The type of activity.</param>
public Game(string name, ActivityType type = ActivityType.Playing)
public Game(string name, ActivityType type = ActivityType.Playing, ActivityProperties flags = ActivityProperties.None, string details = null)
{
Name = name;
Type = type;
Flags = flags;
Details = details;
}
/// <summary> Returns the name of the <see cref="Game"/>. </summary>


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

@@ -29,5 +29,12 @@ namespace Discord
/// The value of flags for this activity.
/// </returns>
ActivityProperties Flags { get; }
/// <summary>
/// Gets the details on what the player is currently doing.
/// </summary>
/// <returns>
/// A string describing what the player is doing.
/// </returns>
string Details { get; }
}
}

Loading…
Cancel
Save