summary refs log tree commit diff
path: root/src/util/interfaces/Activity.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-22 22:12:00 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-22 22:12:00 +1000
commitafefa5d64bd6cde7d6efa3a9a5a3ec67a6ca29a8 (patch)
tree07779150eba77c27bf75bc0c7890f4a3f976716e /src/util/interfaces/Activity.ts
parentremoved char joiners as they are actually useful, added page break (diff)
parentMerge remote-tracking branch 'Puyodead1/patch/prettier-config' into staging (diff)
downloadserver-afefa5d64bd6cde7d6efa3a9a5a3ec67a6ca29a8.tar.xz
Merge remote-tracking branch 'upstream/staging' into fix/categoryNames
Diffstat (limited to 'src/util/interfaces/Activity.ts')
-rw-r--r--src/util/interfaces/Activity.ts44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/util/interfaces/Activity.ts b/src/util/interfaces/Activity.ts
new file mode 100644
index 00000000..43984afd
--- /dev/null
+++ b/src/util/interfaces/Activity.ts
@@ -0,0 +1,44 @@
+export interface Activity {
+	name: string; // the activity's name
+	type: ActivityType; // activity type // TODO: check if its between range 0-5
+	url?: string; // stream url, is validated when type is 1
+	created_at?: number; // unix timestamp of when the activity was added to the user's session
+	timestamps?: {
+		// unix timestamps for start and/or end of the game
+		start: number;
+		end: number;
+	};
+	application_id?: string; // application id for the game
+	details?: string;
+	state?: string;
+	emoji?: {
+		name: string;
+		id?: string;
+		animated: boolean;
+	};
+	party?: {
+		id?: string;
+		size?: [number]; // used to show the party's current and maximum size // TODO: array length 2
+	};
+	assets?: {
+		large_image?: string; // the id for a large asset of the activity, usually a snowflake
+		large_text?: string; // text displayed when hovering over the large image of the activity
+		small_image?: string; // the id for a small asset of the activity, usually a snowflake
+		small_text?: string; // text displayed when hovering over the small image of the activity
+	};
+	secrets?: {
+		join?: string; // the secret for joining a party
+		spectate?: string; // the secret for spectating a game
+		match?: string; // the secret for a specific instanced match
+	};
+	instance?: boolean;
+	flags: string; // activity flags OR d together, describes what the payload includes
+}
+
+export enum ActivityType {
+	GAME = 0,
+	STREAMING = 1,
+	LISTENING = 2,
+	CUSTOM = 4,
+	COMPETING = 5,
+}