K
Docs
API Reference→Pieces→Update the Message
♻️

Update the Message

ui.updateThe Control PanelControls

Rewrites the message the button or dropdown lives on, instead of posting a new one. Stage new buttons before this piece to swap them out; stage none and the existing ones stay put. The classic 'you voted!' in-place update.

When to use this
  • →Leave the text blank and stage new buttons to swap the buttons only
  • →Use Grey Out the Buttons instead if you just want to stop further clicks

On the canvas

This is what Update the Message looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

♻️
Update the Message
ui.update
Controls
content
Thanks for voting, {{user.name}}!
output
error

Config fields

FieldTypeReqWhat it does
content
Thanks for voting, {{user.name}}!
textarea—New message text 💬

Output ports

outputThe message has been rewritten
errorNothing to change, or not a button flow
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
// Rewrites the message the button lives on, rather than posting a new one
await interaction.update({
  content: `Thanks for voting, ${interaction.user.displayName}!`,
  components: newRows,
});