throw er; // Unhandled 'error' event
how can i solv this?
node:events:492
throw er; // Unhandled 'error' event
^
ReferenceError: channel is not defined
at module.exports (/Users/macbookdrink/Desktop/Astarion-Bot/events/interactionCreate.js:18:17)
at Client.emit (node:events:514:28)
at InteractionCreateAction.handle (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.onMessage (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/@discordjs/ws/dist/index.js:988:14)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:395:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
Node.js v18.17.1
4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!define
channel
wydum
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View