Skip to content

Commit 1a998c4

Browse files
committed
Docs: Added some additional articles
1 parent 18f38cc commit 1a998c4

File tree

5 files changed

+368
-3
lines changed

5 files changed

+368
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Activity Types
2+
Discord now lets you reference several activity types. You can use these types to change how your application presents itself to other users.
3+
4+
Below is a table of the Activity Types and their different modes.
5+
6+
| Activity Type | Example |
7+
|---------------|---------|
8+
| Playing | ![](https://i.lu.je/2025/Discord_tdvadyQGNf.png) |
9+
| Listening | ![](https://i.lu.je/2025/Discord_0kqFsY7DUo.png) |
10+
| Watching | ![](https://i.lu.je/2025/Discord_P81U0PWtc9.png) |
11+
| Competing | ![](https://i.lu.je/2025/Discord_7AcYhUz3hp.png) |
12+
13+
> [!NOTE]
14+
> Timers cannot easily controlled. Discord will always show some form of timer and a progress bar is only available on some types.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 | ![](https://i.lu.je/2025/Discord_IAvcJCJ0N6.png) | ![](https://i.lu.je/2025/Discord_tdvadyQGNf.png) | ![](https://i.lu.je/2025/Discord_obmYyhKhfN.png) |
7+
| Listening | ![](https://i.lu.je/2025/Discord_jTfyj05Npz.png) | ![](https://i.lu.je/2025/Discord_0kqFsY7DUo.png) | ![](https://i.lu.je/2025/Discord_nFVsnVgPm5.png) |
8+
| Watching | ![](https://i.lu.je/2025/Discord_P81U0PWtc9.png) | ![](https://i.lu.je/2025/Discord_P81U0PWtc9.png) | ![](https://i.lu.je/2025/Discord_5SPwBlHK2Q.png) |
9+
| Competing | ![](https://i.lu.je/2025/Discord_ZGju3yetFZ.png) | ![](https://i.lu.je/2025/Discord_7AcYhUz3hp.png) | ![](https://i.lu.je/2025/Discord_XTNQLFWbsE.png) |
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+
![](https://i.lu.je/2025/Discord_GzHlOd9WUE.png) | ![](https://i.lu.je/2025/Discord_oiR7lMxial.png)
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`.

Docfx/articles/toc.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- name: Introduction
22
href: intro.md
3+
34
- name: Getting started
45
items:
56
- name: Standard Project
@@ -8,6 +9,13 @@
89
href: getting_started/unity3d.md
910
- name: Mono Game Project
1011
href: getting_started/monogame.md
12+
13+
- name: Activity Types
14+
href: features/activity_types.md
15+
16+
- name: Timestamps
17+
href: features/timestamps.md
18+
1119
- name: Join / Spectate
1220
items:
1321
- name: Introduction
@@ -17,4 +25,4 @@
1725
- name: Joining Games
1826
href: join_spectate/join.md
1927
- name: Spectating Games
20-
href: join_spectate/spectate.md
28+
href: join_spectate/spectate.md

package.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
{
2-
"version": "1.4.2"
3-
}
2+
"version": "1.4.2",
3+
"scripts": {
4+
"docs:watch": "npm-watch docs:build",
5+
"docs:build": "docfx build Docfx/docfx.json"
6+
},
7+
"watch": {
8+
"docs:build": {
9+
"patterns": [ "Docfx/**/*" ],
10+
"extensions": "md,yml",
11+
"quiet": false
12+
}
13+
},
14+
"devDependencies": {
15+
"npm-watch": "^0.11.0"
16+
}
17+
}

pnpm-lock.yaml

Lines changed: 301 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)