fix(client): handle promise rejections

This commit is contained in:
Misono Mika
2024-07-04 14:21:21 +00:00
parent 9b2b2ff609
commit 2ef3df420e

View File

@@ -12,7 +12,7 @@ const Util = require('../util/Util');
*/ */
class BaseClient extends EventEmitter { class BaseClient extends EventEmitter {
constructor(options = {}) { constructor(options = {}) {
super(); super({ captureRejections: true });
if (options.intents) { if (options.intents) {
process.emitWarning('Intents is not available.', 'DeprecationWarning'); process.emitWarning('Intents is not available.', 'DeprecationWarning');