feat(GatewayActivity): add url & status display type fields (#1326)

This commit is contained in:
lew
2025-08-10 12:44:35 -04:00
committed by GitHub
parent 87b52b7890
commit 5f9c1e1b1c
4 changed files with 140 additions and 4 deletions

View File

@@ -182,14 +182,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -280,6 +294,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -317,7 +351,7 @@ export interface GatewayActivityParty {
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
/**

View File

@@ -173,14 +173,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -268,6 +282,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -305,7 +339,7 @@ export interface GatewayActivityParty {
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
/**

View File

@@ -182,14 +182,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -280,6 +294,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -317,7 +351,7 @@ export interface GatewayActivityParty {
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
/**

View File

@@ -173,14 +173,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -268,6 +282,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -305,7 +339,7 @@ export interface GatewayActivityParty {
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
/**