UNPKG

sheweny

Version:

The powerful framework for create discord bots

27 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const discord_js_1 = require("discord.js"); function run(client, i) { switch (i.type) { case discord_js_1.InteractionType.ApplicationCommand: return client.emit('interactionCommandCreate', i); case discord_js_1.InteractionType.ApplicationCommandAutocomplete: return client.emit('interactionAutocompleteCreate', i); case discord_js_1.InteractionType.MessageComponent: switch (i.componentType) { case discord_js_1.ComponentType.Button: return client.emit('interactionButtonCreate', i); case discord_js_1.ComponentType.ChannelSelect: case discord_js_1.ComponentType.RoleSelect: case discord_js_1.ComponentType.StringSelect: case discord_js_1.ComponentType.UserSelect: case discord_js_1.ComponentType.SelectMenu: return client.emit('interactionSelectMenuCreate', i); } break; case discord_js_1.InteractionType.ModalSubmit: return client.emit('interactionModalSubmitCreate', i); } } exports.default = run; //# sourceMappingURL=interactionCreate.js.map