refactor(Interaction): See description
- Change the data returned when interacting, from `nonce: Snowflake` to `data: InteractionResponseBody` (use try catch to detect command errors) - Full support for Autocomplete (Automatically selects the first option)
This commit is contained in:
@@ -8,6 +8,9 @@ const { Events } = require('../../../util/Constants');
|
||||
*/
|
||||
|
||||
module.exports = (client, packet) => {
|
||||
if (client.user.bot) client.actions.InteractionCreate.handle(packet.d);
|
||||
else client.emit(Events.INTERACTION_CREATE, packet.d);
|
||||
if (client.user.bot) {
|
||||
client.actions.InteractionCreate.handle(packet.d);
|
||||
} else {
|
||||
client.emit(Events.INTERACTION_CREATE, packet.d);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user