You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.message = this.channel?.messages._add(data.message) ?? data.message;
^
TypeError: Cannot read properties of undefined (reading '_add')
at new MessageComponentInteraction (/home/stormbeatz/StormBeatz/node_modules/discord.js/src/structures/MessageComponentInteraction.js:27:42)
at new ButtonInteraction (/home/stormbeatz/StormBeatz/node_modules/discord.js/src/structures/ButtonInteraction.js:9:1)
at InteractionCreateAction.handle (/home/stormbeatz/StormBeatz/node_modules/discord.js/src/client/actions/InteractionCreate.js:67:25)
at Object.module.exports [as INTERACTION_CREATE] (/home/stormbeatz/StormBeatz/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
I haven't had the chance to look into exactly how to reproduce this yet, but I'm fairly certain it has to do with the new VC text chats as it started happening around the same time.
I marked this as high priority as it causes the bot to crash.
I was able to reproduce this (both on stable and main) - it is indeed caused by receiving an INTERACTION_CREATE event from a button (and alike) in a text-in-voice channel.
This will be resolved with #6921, but perhaps we should make the library more resilient to this behaviour before the feature is documented by Discord.
If possible, I believe this should be resolved as soon as possible since it causes a crash. To be specific, my bot has crashed 3 times over the past 2 days.
You can run npm install Jiralite/discord.js#13-resilient-interaction-message-cache to install the branch this fix is on for version 13. I have opted for simply stopping interactions received in text-in-voice channels as Discord has not documented them yet and discord.js does not support them yet. When documentation is available from Discord, discord.js will be able to safely emit them in those channels again.
Which package is this bug report for?
discord.js
Issue description
I haven't had the chance to look into exactly how to reproduce this yet, but I'm fairly certain it has to do with the new VC text chats as it started happening around the same time.
I marked this as high priority as it causes the bot to crash.
Code sample
No response
Package version
discord.js@13.6.0
Node.js version
v16.4.0
Operating system
No response
Priority this issue should have
High (immediate attention needed)
Which partials do you have configured?
User, Channel, Message
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildVoiceStates, GuildMessages, DirectMessages
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: