Skip to content

Commit 5f9c1e1

Browse files
authored
feat(GatewayActivity): add url & status display type fields (#1326)
1 parent 87b52b7 commit 5f9c1e1

File tree

4 files changed

+140
-4
lines changed

4 files changed

+140
-4
lines changed

deno/payloads/v10/gateway.ts

Lines changed: 35 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/gateway.ts

Lines changed: 35 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payloads/v10/gateway.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,28 @@ export interface GatewayActivity {
182182
* Application id for the game
183183
*/
184184
application_id?: Snowflake;
185+
/**
186+
* Controls which field is displayed in the user's status text in the member list
187+
*
188+
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
189+
*/
190+
status_display_type?: StatusDisplayType | null;
185191
/**
186192
* What the player is currently doing
187193
*/
188194
details?: string | null;
195+
/**
196+
* URL that is linked when clicking on the details text
197+
*/
198+
details_url?: string | null;
189199
/**
190200
* The user's current party status, or the text used for a custom status
191201
*/
192202
state?: string | null;
203+
/**
204+
* URL that is linked when clicking on the state text
205+
*/
206+
state_url?: string | null;
193207
/**
194208
* The emoji used for a custom status
195209
*
@@ -280,6 +294,26 @@ export enum ActivityType {
280294
Competing,
281295
}
282296

297+
/**
298+
* Controls which field is used in the user's status message
299+
*
300+
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
301+
*/
302+
export enum StatusDisplayType {
303+
/**
304+
* Playing \{name\}
305+
*/
306+
Name,
307+
/**
308+
* Playing \{state\}
309+
*/
310+
State,
311+
/**
312+
* Playing \{details\}
313+
*/
314+
Details,
315+
}
316+
283317
/**
284318
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
285319
*/
@@ -317,7 +351,7 @@ export interface GatewayActivityParty {
317351
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
318352
*/
319353
export type GatewayActivityAssets = Partial<
320-
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
354+
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
321355
>;
322356

323357
/**

payloads/v9/gateway.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,28 @@ export interface GatewayActivity {
173173
* Application id for the game
174174
*/
175175
application_id?: Snowflake;
176+
/**
177+
* Controls which field is displayed in the user's status text in the member list
178+
*
179+
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
180+
*/
181+
status_display_type?: StatusDisplayType | null;
176182
/**
177183
* What the player is currently doing
178184
*/
179185
details?: string | null;
186+
/**
187+
* URL that is linked when clicking on the details text
188+
*/
189+
details_url?: string | null;
180190
/**
181191
* The user's current party status, or the text used for a custom status
182192
*/
183193
state?: string | null;
194+
/**
195+
* URL that is linked when clicking on the state text
196+
*/
197+
state_url?: string | null;
184198
/**
185199
* The emoji used for a custom status
186200
*
@@ -268,6 +282,26 @@ export enum ActivityType {
268282
Competing,
269283
}
270284

285+
/**
286+
* Controls which field is used in the user's status message
287+
*
288+
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
289+
*/
290+
export enum StatusDisplayType {
291+
/**
292+
* Playing \{name\}
293+
*/
294+
Name,
295+
/**
296+
* Playing \{state\}
297+
*/
298+
State,
299+
/**
300+
* Playing \{details\}
301+
*/
302+
Details,
303+
}
304+
271305
/**
272306
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
273307
*/
@@ -305,7 +339,7 @@ export interface GatewayActivityParty {
305339
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
306340
*/
307341
export type GatewayActivityAssets = Partial<
308-
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
342+
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
309343
>;
310344

311345
/**

0 commit comments

Comments
 (0)