Skip to content

Commit

Permalink
Bots can now set activity state (discord#6345)
Browse files Browse the repository at this point in the history
* Bots can now set activity state

* fix custom status format

* wording changes

Co-authored-by: shay <swdewael@gmail.com>

---------

Co-authored-by: shay <swdewael@gmail.com>
  • Loading branch information
advaith1 and shaydewael committed May 14, 2024
1 parent f000b06 commit 5935caf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Activity State for Bot Users

#### Aug 8, 2023

The `state` field in [activity objects](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object) can now be set when [updating presence](#DOCS_TOPICS_GATEWAY_EVENTS/update-presence) for a bot user. The value of `state` will appear as a custom status for the bot user when an [activity's `type`](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-types) is set to `4`, or as additional data under an activity's name for other activity types.

## Public Preview of OpenAPI 3.1 Specification

#### Aug 2, 2023
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/Gateway_Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat
| timestamps? | [timestamps](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-timestamps) object | Unix timestamps for start and/or end of the game |
| application_id? | snowflake | Application ID for the game |
| details? | ?string | What the player is currently doing |
| state? | ?string | User's current party status |
| state? | ?string | User's current party status, or text used for a custom status |
| emoji? | ?[emoji](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-emoji) object | Emoji used for a custom status |
| party? | [party](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-party) object | Information for the current party of the player |
| assets? | [assets](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-assets) object | Images for the presence and their hover texts |
Expand All @@ -1010,7 +1010,7 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat
| buttons? | array of [buttons](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-buttons) | Custom buttons shown in the Rich Presence (max 2) |

> info
> Bots are only able to send `name`, `type`, and optionally `url`.
> Bot users are only able to set `name`, `state`, `type`, and `url`.
###### Activity Types

Expand All @@ -1020,7 +1020,7 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat
| 1 | Streaming | Streaming {details} | "Streaming Rocket League" |
| 2 | Listening | Listening to {name} | "Listening to Spotify" |
| 3 | Watching | Watching {name} | "Watching YouTube Together" |
| 4 | Custom | {emoji} {name} | ":smiley: I am cool" |
| 4 | Custom | {emoji} {state} | ":smiley: I am cool" |
| 5 | Competing | Competing in {name} | "Competing in Arena World Champions" |

> info
Expand Down

0 comments on commit 5935caf

Please sign in to comment.