Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot error leads to crash. #620

Open
Fudster opened this issue Jan 4, 2023 · 2 comments
Open

Bot error leads to crash. #620

Fudster opened this issue Jan 4, 2023 · 2 comments

Comments

@Fudster
Copy link

Fudster commented Jan 4, 2023

Can anyone look into this?

        const message = channel._cacheMessage(new Message(channel, data, client));
                                ^

TypeError: channel._cacheMessage is not a function                               at MessageCreateAction.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/actions/MessageCreate.js:31:33)
    at MessageCreateHandler.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:8:51)    at WebSocketPacketManager.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
    at WebSocketConnection.onPacket (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
    at WebSocket.onMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.dataMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/receiver.js:422:14)```
@Fudster
Copy link
Author

Fudster commented Jan 5, 2023

I found this nodejs/help#3883

Hopefully that fixes it...we will see

@Fudster
Copy link
Author

Fudster commented Jan 5, 2023

I applied the "fix* and it still crashes but with a new error

      message = channel.messages.get(data.id);
                                 ^

TypeError: Cannot read properties of undefined (reading 'get')
    at MessageDeleteAction.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/actions/MessageDelete.js:15:34)
    at MessageDeleteHandler.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/packets/handlers/MessageDelete.js:8:51)    at WebSocketPacketManager.handle (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
    at WebSocketConnection.onPacket (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (/usr/lib/node_modules/discord-irc/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
    at WebSocket.onMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.dataMessage (/usr/lib/node_modules/discord-irc/node_modules/ws/lib/receiver.js:422:14)```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant