mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
fix(Structures): remove Structures (#6027)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
const Action = require('./Action');
|
||||
const ButtonInteraction = require('../../structures/ButtonInteraction');
|
||||
const CommandInteraction = require('../../structures/CommandInteraction');
|
||||
const SelectMenuInteraction = require('../../structures/SelectMenuInteraction');
|
||||
const { Events, InteractionTypes, MessageComponentTypes } = require('../../util/Constants');
|
||||
const Structures = require('../../util/Structures');
|
||||
|
||||
let deprecationEmitted = false;
|
||||
|
||||
@@ -16,15 +18,15 @@ class InteractionCreateAction extends Action {
|
||||
let InteractionType;
|
||||
switch (data.type) {
|
||||
case InteractionTypes.APPLICATION_COMMAND:
|
||||
InteractionType = Structures.get('CommandInteraction');
|
||||
InteractionType = CommandInteraction;
|
||||
break;
|
||||
case InteractionTypes.MESSAGE_COMPONENT:
|
||||
switch (data.data.component_type) {
|
||||
case MessageComponentTypes.BUTTON:
|
||||
InteractionType = Structures.get('ButtonInteraction');
|
||||
InteractionType = ButtonInteraction;
|
||||
break;
|
||||
case MessageComponentTypes.SELECT_MENU:
|
||||
InteractionType = Structures.get('SelectMenuInteraction');
|
||||
InteractionType = SelectMenuInteraction;
|
||||
break;
|
||||
default:
|
||||
client.emit(
|
||||
|
||||
Reference in New Issue
Block a user