From d590caf359b61aa77780385437929f443cbf4a26 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Tue, 7 Sep 2021 12:56:43 +0300 Subject: [PATCH] chore(Gateway): remove `APPLICATION_COMMAND_*` events (#191) BREAKING CHANGE: The three Application Command events have been removed --- deno/gateway/v8.ts | 53 ---------------------------------------------- deno/gateway/v9.ts | 53 ---------------------------------------------- gateway/v8.ts | 53 ---------------------------------------------- gateway/v9.ts | 53 ---------------------------------------------- 4 files changed, 212 deletions(-) diff --git a/deno/gateway/v8.ts b/deno/gateway/v8.ts index 4a5e938c..6f59919a 100644 --- a/deno/gateway/v8.ts +++ b/deno/gateway/v8.ts @@ -5,7 +5,6 @@ import type { Snowflake } from '../globals.ts'; import type { APIApplication, - APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, @@ -190,9 +189,6 @@ export enum GatewayIntentBits { * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events */ export enum GatewayDispatchEvents { - ApplicationCommandCreate = 'APPLICATION_COMMAND_CREATE', - ApplicationCommandDelete = 'APPLICATION_COMMAND_DELETE', - ApplicationCommandUpdate = 'APPLICATION_COMMAND_UPDATE', ChannelCreate = 'CHANNEL_CREATE', ChannelDelete = 'CHANNEL_DELETE', ChannelPinsUpdate = 'CHANNEL_PINS_UPDATE', @@ -298,55 +294,6 @@ export type GatewayDispatchPayload = // #region Dispatch Payloads -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatch = DataPayload< - | GatewayDispatchEvents.ApplicationCommandCreate - | GatewayDispatchEvents.ApplicationCommandUpdate - | GatewayDispatchEvents.ApplicationCommandDelete, - GatewayApplicationCommandModifyDispatchData ->; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; - /** * https://discord.com/developers/docs/topics/gateway#hello */ diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index f98280c8..44ea7bbd 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -5,7 +5,6 @@ import type { Snowflake } from '../globals.ts'; import type { APIApplication, - APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, @@ -193,9 +192,6 @@ export enum GatewayIntentBits { * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events */ export enum GatewayDispatchEvents { - ApplicationCommandCreate = 'APPLICATION_COMMAND_CREATE', - ApplicationCommandDelete = 'APPLICATION_COMMAND_DELETE', - ApplicationCommandUpdate = 'APPLICATION_COMMAND_UPDATE', ChannelCreate = 'CHANNEL_CREATE', ChannelDelete = 'CHANNEL_DELETE', ChannelPinsUpdate = 'CHANNEL_PINS_UPDATE', @@ -308,55 +304,6 @@ export type GatewayDispatchPayload = // #region Dispatch Payloads -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatch = DataPayload< - | GatewayDispatchEvents.ApplicationCommandCreate - | GatewayDispatchEvents.ApplicationCommandUpdate - | GatewayDispatchEvents.ApplicationCommandDelete, - GatewayApplicationCommandModifyDispatchData ->; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; - /** * https://discord.com/developers/docs/topics/gateway#hello */ diff --git a/gateway/v8.ts b/gateway/v8.ts index 490087fb..4802f4bc 100644 --- a/gateway/v8.ts +++ b/gateway/v8.ts @@ -5,7 +5,6 @@ import type { Snowflake } from '../globals'; import type { APIApplication, - APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, @@ -190,9 +189,6 @@ export const enum GatewayIntentBits { * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events */ export const enum GatewayDispatchEvents { - ApplicationCommandCreate = 'APPLICATION_COMMAND_CREATE', - ApplicationCommandDelete = 'APPLICATION_COMMAND_DELETE', - ApplicationCommandUpdate = 'APPLICATION_COMMAND_UPDATE', ChannelCreate = 'CHANNEL_CREATE', ChannelDelete = 'CHANNEL_DELETE', ChannelPinsUpdate = 'CHANNEL_PINS_UPDATE', @@ -298,55 +294,6 @@ export type GatewayDispatchPayload = // #region Dispatch Payloads -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatch = DataPayload< - | GatewayDispatchEvents.ApplicationCommandCreate - | GatewayDispatchEvents.ApplicationCommandUpdate - | GatewayDispatchEvents.ApplicationCommandDelete, - GatewayApplicationCommandModifyDispatchData ->; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; - /** * https://discord.com/developers/docs/topics/gateway#hello */ diff --git a/gateway/v9.ts b/gateway/v9.ts index f5a26e71..c9513c62 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -5,7 +5,6 @@ import type { Snowflake } from '../globals'; import type { APIApplication, - APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, @@ -193,9 +192,6 @@ export const enum GatewayIntentBits { * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events */ export const enum GatewayDispatchEvents { - ApplicationCommandCreate = 'APPLICATION_COMMAND_CREATE', - ApplicationCommandDelete = 'APPLICATION_COMMAND_DELETE', - ApplicationCommandUpdate = 'APPLICATION_COMMAND_UPDATE', ChannelCreate = 'CHANNEL_CREATE', ChannelDelete = 'CHANNEL_DELETE', ChannelPinsUpdate = 'CHANNEL_PINS_UPDATE', @@ -308,55 +304,6 @@ export type GatewayDispatchPayload = // #region Dispatch Payloads -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatch = DataPayload< - | GatewayDispatchEvents.ApplicationCommandCreate - | GatewayDispatchEvents.ApplicationCommandUpdate - | GatewayDispatchEvents.ApplicationCommandDelete, - GatewayApplicationCommandModifyDispatchData ->; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - * https://discord.com/developers/docs/topics/gateway#application-command-update - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-create - */ -export type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-update - */ -export type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; - -/** - * https://discord.com/developers/docs/topics/gateway#application-command-delete - */ -export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; - /** * https://discord.com/developers/docs/topics/gateway#hello */