You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Game.cs 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma warning disable CS1591
  2. using Newtonsoft.Json;
  3. using Newtonsoft.Json.Serialization;
  4. using System.Runtime.Serialization;
  5. namespace Discord.API
  6. {
  7. internal class Game
  8. {
  9. [JsonProperty("name")]
  10. public string Name { get; set; }
  11. [JsonProperty("url")]
  12. public Optional<string> StreamUrl { get; set; }
  13. [JsonProperty("type")]
  14. public Optional<ActivityType?> Type { get; set; }
  15. [JsonProperty("details")]
  16. public Optional<string> Details { get; set; }
  17. [JsonProperty("state")]
  18. public Optional<string> State { get; set; }
  19. [JsonProperty("application_id")]
  20. public Optional<ulong> ApplicationId { get; set; }
  21. [JsonProperty("assets")]
  22. public Optional<API.GameAssets> Assets { get; set; }
  23. [JsonProperty("party")]
  24. public Optional<API.GameParty> Party { get; set; }
  25. [JsonProperty("secrets")]
  26. public Optional<API.GameSecrets> Secrets { get; set; }
  27. [JsonProperty("timestamps")]
  28. public Optional<API.GameTimestamps> Timestamps { get; set; }
  29. [JsonProperty("instance")]
  30. public Optional<bool> Instance { get; set; }
  31. [JsonProperty("sync_id")]
  32. public Optional<string> SyncId { get; set; }
  33. [JsonProperty("session_id")]
  34. public Optional<string> SessionId { get; set; }
  35. [JsonProperty("Flags")]
  36. public Optional<ActivityFlag> Flags { get; set; }
  37. [OnError]
  38. internal void OnError(StreamingContext context, ErrorContext errorContext)
  39. {
  40. errorContext.Handled = true;
  41. }
  42. }
  43. }