/
CustomStatusGame.cs
54 lines (47 loc) · 1.62 KB
/
CustomStatusGame.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Diagnostics;
namespace Discord
{
/// <summary>
/// A user's activity for their custom status.
/// </summary>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class CustomStatusGame : Game
{
internal CustomStatusGame() { }
/// <summary>
/// Creates a new custom status activity.
/// </summary>
/// <remarks>
/// Bots can't set custom status emoji.
/// </remarks>
/// <param name="state">The string displayed as bot's custom status.</param>
public CustomStatusGame(string state)
{
Name = "Custom Status";
State = state;
Type = ActivityType.CustomStatus;
}
/// <summary>
/// Gets the emote, if it is set.
/// </summary>
/// <returns>
/// An <see cref="IEmote"/> containing the <see cref="Emoji"/> or <see cref="GuildEmote"/> set by the user.
/// </returns>
public IEmote Emote { get; internal set; }
/// <summary>
/// Gets the timestamp of when this status was created.
/// </summary>
/// <returns>
/// A <see cref="DateTimeOffset"/> containing the time when this status was created.
/// </returns>
public DateTimeOffset CreatedAt { get; internal set; }
/// <summary>
/// Gets the state of the status.
/// </summary>
public string State { get; internal set; }
public override string ToString()
=> $"{Emote} {State}";
private string DebuggerDisplay => $"{Name}";
}
}