summary refs log tree commit diff
path: root/util/src/interfaces/Event.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/interfaces/Event.ts')
-rw-r--r--util/src/interfaces/Event.ts37
1 files changed, 37 insertions, 0 deletions
diff --git a/util/src/interfaces/Event.ts b/util/src/interfaces/Event.ts
index 13fd4b8b..a5253c09 100644
--- a/util/src/interfaces/Event.ts
+++ b/util/src/interfaces/Event.ts
@@ -13,6 +13,7 @@ import { ConnectedAccount } from "../entities/ConnectedAccount";
 import { Relationship, RelationshipType } from "../entities/Relationship";
 import { Presence } from "./Presence";
 import { Sticker } from "..";
+import { Activity, Status } from ".";
 
 export interface Event {
 	guild_id?: string;
@@ -454,6 +455,37 @@ export interface RelationshipRemoveEvent extends Event {
 	data: Omit<PublicRelationship, "nickname">;
 }
 
+export interface SessionsReplace extends Event {
+	event: "SESSIONS_REPLACE";
+	data: {
+		activities: Activity[];
+		client_info: {
+			version: number;
+			os: string;
+			client: string;
+		};
+		status: Status;
+	}[];
+}
+
+export interface GuildMemberListUpdate extends Event {
+	event: "GUILD_MEMBER_LIST_UPDATE";
+	data: {
+		groups: { id: string; count: number }[];
+		guild_id: string;
+		id: string;
+		member_count: number;
+		online_count: number;
+		ops: {
+			index: number;
+			item: {
+				member?: PublicMember & { presence: Presence };
+				group?: { id: string; count: number }[];
+			};
+		}[];
+	};
+}
+
 export type EventData =
 	| InvalidatedEvent
 	| ReadyEvent
@@ -474,6 +506,7 @@ export type EventData =
 	| GuildMemberRemoveEvent
 	| GuildMemberUpdateEvent
 	| GuildMembersChunkEvent
+	| GuildMemberListUpdate
 	| GuildRoleCreateEvent
 	| GuildRoleUpdateEvent
 	| GuildRoleDeleteEvent
@@ -523,6 +556,7 @@ export enum EVENTEnum {
 	GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
 	GuildMemberSpeaking = "GUILD_MEMBER_SPEAKING",
 	GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+	GuildMemberListUpdate = "GUILD_MEMBER_LIST_UPDATE",
 	GuildRoleCreate = "GUILD_ROLE_CREATE",
 	GuildRoleDelete = "GUILD_ROLE_DELETE",
 	GuildRoleUpdate = "GUILD_ROLE_UPDATE",
@@ -546,6 +580,7 @@ export enum EVENTEnum {
 	ApplicationCommandCreate = "APPLICATION_COMMAND_CREATE",
 	ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE",
 	ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE",
+	SessionsReplace = "SESSIONS_REPLACE",
 }
 
 export type EVENT =
@@ -569,6 +604,7 @@ export type EVENT =
 	| "GUILD_MEMBER_UPDATE"
 	| "GUILD_MEMBER_SPEAKING"
 	| "GUILD_MEMBERS_CHUNK"
+	| "GUILD_MEMBER_LIST_UPDATE"
 	| "GUILD_ROLE_CREATE"
 	| "GUILD_ROLE_DELETE"
 	| "GUILD_ROLE_UPDATE"
@@ -597,6 +633,7 @@ export type EVENT =
 	| "MESSAGE_ACK"
 	| "RELATIONSHIP_ADD"
 	| "RELATIONSHIP_REMOVE"
+	| "SESSIONS_REPLACE"
 	| CUSTOMEVENTS;
 
 export type CUSTOMEVENTS = "INVALIDATED" | "RATELIMIT";