From 0cd336f3be7c04b639bfe941e30a63f8c2d900b4 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Tue, 22 Mar 2022 18:19:08 +0000 Subject: [PATCH] fix: add GUILD_LOADED_DD to types --- types/shared.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/types/shared.ts b/types/shared.ts index 216e728ab..522d5bea5 100644 --- a/types/shared.ts +++ b/types/shared.ts @@ -978,7 +978,12 @@ export type GatewayDispatchEventNames = | "THREAD_LIST_SYNC" | "THREAD_MEMBERS_UPDATE"; -export type GatewayEventNames = GatewayDispatchEventNames | "READY" | "RESUMED"; +export type GatewayEventNames = + | GatewayDispatchEventNames + | "READY" + | "RESUMED" + // THIS IS A CUSTOM DD EVENT NOT A DISCORD EVENT + | "GUILD_LOADED_DD"; /** https://discord.com/developers/docs/topics/gateway#list-of-intents */ export enum GatewayIntents { @@ -1313,11 +1318,11 @@ export type KeysWithUndefined = { export type Optionalize = // Collections don't need optionalizing T extends Collection ? T - // If an array only optionalize objects in arrays - : T extends unknown[] ? T[number] extends Record ? Array> + : // If an array only optionalize objects in arrays + T extends unknown[] ? T[number] extends Record ? Array> : T - // Specific optionalizing of {} go here - : T extends object ? Id< + : // Specific optionalizing of {} go here + T extends object ? Id< & { [K in KeysWithUndefined]?: T[K] extends Collection ? T[K] : Optionalize; }