Skip to content

Trying to remove all buttons from a message, getting "Cannot have empty row!" #2392

Discussion options

You must be logged in to vote

I found a solution, but id still like to know if this is the intended way:

  1. Loop over all components via message.components
  2. Loop over any component that is an ActionRow
  3. Remove said ActionRow if you want to clear the buttons
  4. Re-apply via editMessageComponents()

Is this intentional? Surely it would be much simpler if setActionRow with an empty list would remove them, no?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@MinnDevelopment
Comment options

@SvenWollinger
Comment options

Answer selected by SvenWollinger
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants