sp00ktober
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by sp00ktober on 3/15/2024 in #djs-questions
Modals in Node-Red using Discord JS
A little offtopic but its based on discord.js, i hope to find some support here anyways.
In node red i try to show a modal with text input in response to a slash command.
for this i took the example from the webpage and modified it to fit into node red, here is my code:
Last line produces this error:
TypeError: Cannot read properties of undefined (reading 'rest')
The msg.interactionObject
is a copy of the interaction
object from the discord.js examples callbacks.
I modified the node red version to not send deferReply()
too early (before my own flow code comes), basically here: https://github.com/Markoudstaal/node-red-contrib-discord-advanced/blob/6dedf30e2f88c616ac28992b733dbff37b23796a/discord/discordInteraction.js#L58
still i dont understand the error i get, ideas?5 replies