2022-12-12 18:40:55 +07:00

17 lines
414 B
JavaScript

'use strict';
const { Events } = require('../../../util/Constants');
/**
* @typedef {Object} InteractionResponseBody
* @property {Snowflake} id Interaction ID
* @property {Snowflake} nonce nonce in POST /interactions
*/
module.exports = (client, { d: data }) => {
if (client.user.bot) {
client.actions.InteractionCreate.handle(data);
} else {
client.emit(Events.INTERACTION_CREATE, data);
}
};