I'm getting this error when using the NPM package:
(node:12764) UnhandledPromiseRejectionWarning: TypeError: global.addEventListener is not a function
at new NchanSubscriber (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\nchan\NchanSubscriber.js:353:12)
at Client.bot.on (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\index.js:10:13)
at Client.emit (events.js:203:15)
at WebSocketConnection.triggerReady (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:13:31)
at WebSocketPacketManager.handle (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\ws\lib\event-target.js:120:16)
(node:12764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12764) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi,
I'm getting this error when using the NPM package:
May I get some support on this?
Thanks!