YellowLink
YellowLink
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
sorry for the pointless post lol
10 replies
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
okay, I feel real silly now, I updated discord.js and it worked. I swear I tried that
10 replies
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
Sorry for using multiple messages, character limit
10 replies
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
I don't know how to approach this error because none of the listed files are ones I made and know how to deal with.
10 replies
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:45
id: messageInteractionMetadata.id,
^

TypeError: Cannot read properties of undefined (reading 'id')
at _transformAPIMessageInteractionMetadata (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:45:36)
at _transformAPIMessageInteractionMetadata (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:52:9)
at Message._patch (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/structures/Message.js:409:34)
at new Message (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/structures/Message.js:52:10)
at GuildMessageManager._add (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/managers/CachedManager.js:58:32)
at GuildMessageManager._add (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/managers/MessageManager.js:38:18)
at MessageCreateAction.handle (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/actions/MessageCreate.js:20:52)
at module.exports [as MESSAGE_CREATE] (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12)

Node.js v21.6.2
/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:45
id: messageInteractionMetadata.id,
^

TypeError: Cannot read properties of undefined (reading 'id')
at _transformAPIMessageInteractionMetadata (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:45:36)
at _transformAPIMessageInteractionMetadata (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/util/Transformers.js:52:9)
at Message._patch (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/structures/Message.js:409:34)
at new Message (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/structures/Message.js:52:10)
at GuildMessageManager._add (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/managers/CachedManager.js:58:32)
at GuildMessageManager._add (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/managers/MessageManager.js:38:18)
at MessageCreateAction.handle (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/actions/MessageCreate.js:20:52)
at module.exports [as MESSAGE_CREATE] (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (/home/yellowlink/Documents/GitHub/ChaosBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12)

Node.js v21.6.2
It now has started throwing this error and ending the terminal process. It breaks specifically after this line:
await interaction.reply({ content: `<@${interaction.user.id}> answered: \`${userInput}\`:
The correct answer is...`, components: [] });
await interaction.reply({ content: `<@${interaction.user.id}> answered: \`${userInput}\`:
The correct answer is...`, components: [] });
10 replies
DIAdiscord.js - Imagine an app
Created by YellowLink on 12/4/2024 in #djs-questions
TypeError at _transformAPIMessageInteractionMetadata
This is a function I have for handling a particular modal submission. It takes a text input in the form of a name, checks if it matches - one of - the correct answer(s), and should do different things depending on whether the person got the answer right. This function used to work verbatim before the 14.16 update (more accurately, the last time it was used was before the update and it worked as intended then).
10 replies