Merge pull request #1205 from misonomikadev/main

fix(client): handle promise rejections
This commit is contained in:
Elysia
2024-07-04 21:26:04 +07:00
committed by GitHub

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');