#Which part of the code do I copy to put a button on my embed?

12 messages · Page 1 of 1 (latest)

spark riverBOT
#

• 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.

acoustic yoke
#

The parts where the components are created and sent with components property. Where did you find this code

#

Ah, it says at the top

To create a button, use the MessageActionRow() and MessageButton() builder functions and then pass the resulting object to CommandInteraction#reply() as InteractionReplyOptions:

vital stump
#

You need to add the button to the row, capitalize the style, and send that row when you reply to the interaction or send a message

#

You should try your code and reply with any specific errors you get

vital stump
#

I didn't think I needed to clarify this, but you still have to use valid javascript syntax in your javascript files

#

You shouldn't but you can
That doesn't change the fact that you need to provide replit with valid code

#

And what error does that throw?

#

Syntax errors are exactly what they sound like: your syntax is wrong
The error even says that you're missing a )

#

Where did you define it?

#

#rules 2 states that you need to be competent in javascript before making Discord bots
Again, your error message tells you the exact problem

vital stump
#

Please show the line where you defined it