Skip to content

Commit

Permalink
finish removing UnknownInteraction
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Nov 29, 2021
1 parent 2a8ceaa commit 4d26a0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/gateway/Shard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ class Shard extends EventEmitter {
/**
* Fired when an interaction is created
* @event Client#interactionCreate
* @prop {PingInteraction | CommandInteraction | ComponentInteraction | AutocompleteInteraction | UnknownInteraction} Interaction The Interaction that was created
* @prop {PingInteraction | CommandInteraction | ComponentInteraction | AutocompleteInteraction} Interaction The Interaction that was created
*/
this.emit("interactionCreate", Interaction.from(packet.d, this.client));
break;
Expand Down
4 changes: 1 addition & 3 deletions lib/structures/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Base = require("./Base");
const {InteractionTypes} = require("../Constants");

/**
* Represents an interaction. You also probably want to look at PingInteraction, CommandInteraction, ComponentInteraction, AutocompleteInteraction, and UnknownInteraction.
* Represents an interaction. You also probably want to look at CommandInteraction, ComponentInteraction, and AutocompleteInteraction.
* @prop {Boolean} acknowledged Whether or not the interaction has been acknowledged
* @prop {String} applicationID The ID of the interaction's application
* @prop {String} id The ID of the interaction
Expand Down Expand Up @@ -44,7 +44,6 @@ class Interaction extends Base {
}

this._client.emit("warn", new Error(`Unknown interaction type: ${data.type}\n${JSON.stringify(data)}`));
return new UnknownInteraction(data, client);
}
}

Expand All @@ -55,4 +54,3 @@ const PingInteraction = require("./PingInteraction");
const CommandInteraction = require("./CommandInteraction");
const ComponentInteraction = require("./ComponentInteraction");
const AutocompleteInteraction = require("./AutocompleteInteraction");
const UnknownInteraction = require("./UnknownInteraction");

0 comments on commit 4d26a0e

Please sign in to comment.