chore: clean code

This commit is contained in:
March 7th
2022-11-19 17:59:25 +07:00
parent 99882764ec
commit ac63d40cb3
4 changed files with 27 additions and 18 deletions

View File

@@ -217,7 +217,7 @@ class MessageButton extends BaseMessageComponent {
message.client.removeListener('interactionResponse', handler);
message.client.decrementMaxListeners();
reject(new Error('INTERACTION_TIMEOUT'));
}, 15_000).unref();
}, message.client.options.interactionTimeout).unref();
message.client.incrementMaxListeners();
message.client.on('interactionResponse', handler);
});

View File

@@ -396,7 +396,7 @@ class MessageSelectMenu extends BaseMessageComponent {
message.client.removeListener('interactionResponse', handler);
message.client.decrementMaxListeners();
reject(new Error('INTERACTION_TIMEOUT'));
}, 15_000).unref();
}, message.client.options.interactionTimeout).unref();
message.client.incrementMaxListeners();
message.client.on('interactionResponse', handler);
});