|
| 1 | +# Timestamps |
| 2 | +You can display timers and progress in your activity. However, Discord likes to change their mind on how these are displayed. Below is a matrix of all the variety of timers you can set and what they will do. |
| 3 | + |
| 4 | +| Activity Type / Timestamps | `null` | `Timestamps.Now` | `Timestamps.FromTimespan` | |
| 5 | +|---------------|------------------|------------|--------------| |
| 6 | +| Playing |  |  |  | |
| 7 | +| Listening |  |  |  | |
| 8 | +| Watching |  |  |  | |
| 9 | +| Competing |  |  |  | |
| 10 | + |
| 11 | +Your control over what is displayed is limited. You use to be able to set a count down timer in a Playing activity, but Discord has since removed that. Now the only purpose of setting a timestamp is for Listening and Watching activities. |
| 12 | + |
| 13 | +As an example, the following snippet of code will make it as if you are playing a Video. |
| 14 | + |  |
| 15 | +```cs |
| 16 | +client.SetPresence(new RichPresence() |
| 17 | +{ |
| 18 | + Type = ActivityType.Watching, |
| 19 | + StatusDisplay = StatusDisplayType.Details, |
| 20 | + Details = "Skibidi Toilet - Season 1", |
| 21 | + State = "DaFuq!?Boom!", |
| 22 | + Timestamps = Timestamps.FromTimeSpan(66), |
| 23 | +}); |
| 24 | +``` |
| 25 | + |
| 26 | +> [!TIP] |
| 27 | +> This library provides a variety of ways to set the time. |
| 28 | +> The [Timestamps.FromTimeSpan](xref:DiscordRPC.Timestamps.FromTimeSpan(double)) will allow you to use seconds, or a `System.DateTime.TimeSpan`. |
0 commit comments