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

Each message in a Discord voice channels crashes the bridge #906

Open
schrmh opened this issue Oct 17, 2023 · 1 comment
Open

Each message in a Discord voice channels crashes the bridge #906

schrmh opened this issue Oct 17, 2023 · 1 comment

Comments

@schrmh
Copy link

schrmh commented Oct 17, 2023

Literally the title. It is reproducable, I tried it several times and it worked every time...
My bridge is only a few days old and only active for one guild.

/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11
      const existing = channel.messages.cache.get(data.id);
                                        ^
TypeError: Cannot read properties of undefined (reading 'cache')
    at MessageCreateAction.handle (/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11:41)
    at Object.module.exports (/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketManager.js:391:31)
    at WebSocketShard.onPacket (/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:451:22)
    at WebSocketShard.onMessage (/home/user/matrix-appservice-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:308:10)
    at WebSocket.onMessage (/home/user/matrix-appservice-discord/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (node:events:514:28)
    at Receiver.receiverOnMessage (/home/user/matrix-appservice-discord/node_modules/ws/lib/websocket.js:1068:20)
    at Receiver.emit (node:events:514:28)
    at Receiver.dataMessage (/home/user/matrix-appservice-discord/node_modules/ws/lib/receiver.js:517:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Maybe a bit related to #883 but the difference is that it happens in channel.messages.cache.get for me and manager.cache.get there.

Any ideas for a workaround? Would using a newer discord.js help? (t2bot does that: t2bot@2603f94)

@Mrs-Feathers
Copy link

i know this isn't what you want to hear, but our server simply disabled messages in voice channels.

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

2 participants