Skip to content

Commit

Permalink
feat(GatewayActivity): add missing fields (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
  • Loading branch information
3 people committed Dec 24, 2020
1 parent 70b427b commit dccdfe0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions v8/payloads/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,31 @@ export type GatewayPresenceClientStatus = Partial<Record<'desktop' | 'mobile' |
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
*/
export interface GatewayActivity {
id: string;
name: string;
type: ActivityType;
url?: string | null;
created_at: number;
timestamps?: GatewayActivityTimestamps;
sync_id?: string;
platform?: ActivityPlatform;
application_id?: string;
details?: string | null;
state?: string | null;
emoji?: GatewayActivityEmoji;
session_id?: string;
party?: GatewayActivityParty;
assets?: GatewayActivityAssets;
secrets?: GatewayActivitySecrets;
instance?: boolean;
flags?: ActivityFlags;
buttons?: string[] | GatewayActivityButton[];
}

export enum ActivityPlatform {
Desktop = 'desktop',
Samsung = 'samsung',
Xbox = 'xbox',
}

/**
Expand Down Expand Up @@ -132,3 +143,8 @@ export const enum ActivityFlags {
SYNC = 1 << 4,
PLAY = 1 << 5,
}

export interface GatewayActivityButton {
label: string;
url: string;
}

0 comments on commit dccdfe0

Please sign in to comment.