23 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.<MessageComponentInteraction>.customId
wdum
can i have an example
I just sent the example
whats MessageComponentInteraction
your button or select menu
huh?
ReferenceError: MessageComponentInteraction is not defined
what about my button or select menu?
the name of your button or menu
for example
button.customId
what would the name be for this one?
?
whenever someone clicks that button, it will emit the
interactionCreate
event with a ButtonInteraction
instance (an extension of the MessageComponentInteraction
class) which has a .customId
property that would be the userinfo-${id}
stringyeah but what do i use to get the customId
aButtonInteraction
instance (...) which has a.customId
property
so ButtonInteraction.customId?
If
ButtonInteraction
is how you defined your ButtonInteraction instance and not the ButtonInteraction class itself, then yes!i honestly dont know what most of what you said means
i have:
but: rawError: { message: 'Cannot send an empty message', code: 50006 },
Because you defined
ButtonInteraction
as the class
ButtonInteraction.customId
attempts to access the customId
static property of the ButtonInteraction
class, which is undefined, so Discord sees you're trying to send a message without contentThis is the best way to temporarily collect button interactions that were sent in response to commands
how do i save ButtonInteraction then