diff --git a/packages/discord.js/src/client/actions/InteractionCreate.js b/packages/discord.js/src/client/actions/InteractionCreate.js index 762032383..e412f1a9a 100644 --- a/packages/discord.js/src/client/actions/InteractionCreate.js +++ b/packages/discord.js/src/client/actions/InteractionCreate.js @@ -1,6 +1,5 @@ 'use strict'; -const process = require('node:process'); const Action = require('./Action'); const AutocompleteInteraction = require('../../structures/AutocompleteInteraction'); const ButtonInteraction = require('../../structures/ButtonInteraction'); @@ -10,8 +9,6 @@ const SelectMenuInteraction = require('../../structures/SelectMenuInteraction'); const UserContextMenuCommandInteraction = require('../../structures/UserContextMenuCommandInteraction'); const { Events, InteractionTypes, MessageComponentTypes, ApplicationCommandTypes } = require('../../util/Constants'); -let deprecationEmitted = false; - class InteractionCreateAction extends Action { handle(data) { const client = this.client; @@ -72,17 +69,6 @@ class InteractionCreateAction extends Action { * @param {Interaction} interaction The interaction which was created */ client.emit(Events.INTERACTION_CREATE, interaction); - - /** - * Emitted when an interaction is created. - * @event Client#interaction - * @param {Interaction} interaction The interaction which was created - * @deprecated Use {@link Client#event:interactionCreate} instead - */ - if (client.emit('interaction', interaction) && !deprecationEmitted) { - deprecationEmitted = true; - process.emitWarning('The interaction event is deprecated. Use interactionCreate instead', 'DeprecationWarning'); - } } } diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index ed5cad623..3dbcad2e8 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3929,8 +3929,6 @@ export interface ClientEvents extends BaseClientEvents { userUpdate: [oldUser: User | PartialUser, newUser: User]; voiceStateUpdate: [oldState: VoiceState, newState: VoiceState]; webhookUpdate: [channel: TextChannel | NewsChannel]; - /** @deprecated Use interactionCreate instead */ - interaction: [interaction: Interaction]; interactionCreate: [interaction: Interaction]; shardDisconnect: [closeEvent: CloseEvent, shardId: number]; shardError: [error: Error, shardId: number]; diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 3e6b6415f..1347ecda6 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -661,7 +661,7 @@ client.on('messageCreate', async message => { }); }); -client.on('interaction', async interaction => { +client.on('interactionCreate', async interaction => { expectType(interaction.guildId); expectType(interaction.channelId); expectType(interaction.member);