feat: add support for autocomplete interactions (#6672)

Co-authored-by: Suneet Tipirneni <suneettipirneni@icloud.com>
This commit is contained in:
Micah Benac
2021-10-28 18:47:50 -04:00
committed by GitHub
parent 14d9a9901b
commit ddf759c811
14 changed files with 224 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
const Action = require('./Action');
const AutocompleteInteraction = require('../../structures/AutocompleteInteraction');
const ButtonInteraction = require('../../structures/ButtonInteraction');
const CommandInteraction = require('../../structures/CommandInteraction');
const ContextMenuInteraction = require('../../structures/ContextMenuInteraction');
@@ -51,6 +52,9 @@ class InteractionCreateAction extends Action {
return;
}
break;
case InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE:
InteractionType = AutocompleteInteraction;
break;
default:
client.emit(Events.DEBUG, `[INTERACTION] Received interaction with unknown type: ${data.type}`);
return;