feat: add UserContextMenuInteraction and MessageContextMenuInteraction (#7003)

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
This commit is contained in:
GrapeColor
2021-12-01 20:31:37 +09:00
committed by GitHub
parent a39d8c4d9d
commit 4fe063f0d0
6 changed files with 90 additions and 3 deletions

View File

@@ -4,8 +4,9 @@ const Action = require('./Action');
const AutocompleteInteraction = require('../../structures/AutocompleteInteraction');
const ButtonInteraction = require('../../structures/ButtonInteraction');
const CommandInteraction = require('../../structures/CommandInteraction');
const ContextMenuInteraction = require('../../structures/ContextMenuInteraction');
const MessageContextMenuInteraction = require('../../structures/MessageContextMenuInteraction');
const SelectMenuInteraction = require('../../structures/SelectMenuInteraction');
const UserContextMenuInteraction = require('../../structures/UserContextMenuInteraction');
const { Events, InteractionTypes, MessageComponentTypes, ApplicationCommandTypes } = require('../../util/Constants');
let deprecationEmitted = false;
@@ -25,8 +26,10 @@ class InteractionCreateAction extends Action {
InteractionType = CommandInteraction;
break;
case ApplicationCommandTypes.USER:
InteractionType = UserContextMenuInteraction;
break;
case ApplicationCommandTypes.MESSAGE:
InteractionType = ContextMenuInteraction;
InteractionType = MessageContextMenuInteraction;
break;
default:
client.emit(