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:
March 7th
2022-07-12 19:30:18 +07:00
parent ec809a0f95
commit 1a6b3addfe
14 changed files with 198 additions and 37 deletions

View File

@@ -8,4 +8,8 @@ module.exports = (client, { d: data }) => {
* @param {InteractionResponseBody} data data
*/
client.emit(Events.INTERACTION_FAILURE, data);
client.emit('interactionResponse', {
status: false,
metadata: data,
});
};