Skip to content

Voice channel messages crash the WaspBot inside of discord.js library #46

@FranjoMindek

Description

@FranjoMindek

Sending messages to voice channels crashes our WaspBot instance.

Following error was recorded each time a message was sent to #!launch-week-9

  |   | 2025-04-14 16:00:30.323 | at Receiver.dataMessage (/app/node_modules/ws/lib/receiver.js:437:14) |  
  |   | 2025-04-14 16:00:30.323 | at Receiver.emit (node:events:524:28) |  
  |   | 2025-04-14 16:00:30.323 | at Receiver.receiverOnMessage (/app/node_modules/ws/lib/websocket.js:825:20) |  
  |   | 2025-04-14 16:00:30.323 | at WebSocket.emit (node:events:524:28) |  
  |   | 2025-04-14 16:00:30.323 | at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:132:16) |  
  |   | 2025-04-14 16:00:30.323 | at WebSocketShard.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) |  
  |   | 2025-04-14 16:00:30.323 | at WebSocketShard.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) |  
  |   | 2025-04-14 16:00:30.323 | at WebSocketManager.handlePacket (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) |  
  |   | 2025-04-14 16:00:30.323 | at module.exports [as MESSAGE_CREATE] (/app/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) |  
  |   | 2025-04-14 16:00:30.323 | at MessageCreateAction.handle (/app/node_modules/discord.js/src/client/actions/MessageCreate.js:11:41) |  
  |   | 2025-04-14 16:00:30.323 | TypeError: Cannot read properties of undefined (reading 'cache') |  
  |   | 2025-04-14 16:00:30.323 | ^ |  
  |   | 2025-04-14 16:00:30.323 | const existing = channel.messages.cache.get(data.id); |  
  |   | 2025-04-14 16:00:30.323 | /app/node_modules/discord.js/src/client/actions/MessageCreate.js:11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions