Home > Mobile >  How to add ActionRow to a message in jda
How to add ActionRow to a message in jda

Time:12-09

I want to add an ActionRow to a message

i tried

ActionRow row1 = ActionRow.of(Button.danger("top_btn" , "top button"))
ActionRow row2 = ActionRow.of(Button.danger("buttom_btn" , "button button"))

event.getMessage().reply("this is buttons")
.setActionRow(row1 ,row2)

And it returned error

I also tried .setACtionRows instead of setActionRow but is was undefined .

CodePudding user response:

Try "setComponents" or "addComponents" instead of setActionRow.

https://jda.wiki/using-jda/interactions/#component-interactions

  • Related