Merge pull request #143 from Skillz4Killz/add-missing-activity-types

Add missing activity types
This commit is contained in:
chroventer
2020-10-26 22:35:00 -07:00
committed by GitHub
2 changed files with 47 additions and 8 deletions
+47 -3
View File
@@ -1,12 +1,18 @@
import type { Timestamps } from "./discord.ts";
export interface ActivityPayload {
name: string;
type: number;
url?: string;
created_at: number;
timestamps: Timestamps;
timestamps?: ActivityTimestamps;
application_id?: string;
details?: string;
state?: string;
emoji?: ActivityEmoji;
party?: ActivityParty;
assets?: ActivityAssets;
secrets?: ActivitySecrets;
instance?: boolean;
flags?: number;
}
export enum ActivityType {
@@ -21,3 +27,41 @@ export enum ActivityType {
/** Example: "Competing in Arena World Champions" */
Competing,
}
export interface ActivityTimestamps {
start?: number;
end?: number;
}
export interface ActivityEmoji {
name: string;
id?: string;
animated?: boolean;
}
export interface ActivityParty {
id?: string;
size?: [number, number];
}
export interface ActivityAssets {
large_image?: string;
large_text?: string;
small_image?: string;
small_text?: string;
}
export interface ActivitySecrets {
join?: string;
spectate?: string;
match?: string;
}
export enum ActivityFlags {
INSTANCE = 1 << 0,
JOIN = 1 << 1,
SPECTATE = 1 << 2,
JOIN_REQUEST = 1 << 3,
SYNC = 1 << 4,
PLAY = 1 << 5,
}
-5
View File
@@ -196,11 +196,6 @@ export interface Properties {
$device: string;
}
export interface Timestamps {
start?: number;
end?: number;
}
export interface Emoji {
name: string;
id?: string;