BotNetwork

Message components and buttons

component interactions must ACK fast; version custom_id and never store secrets there.

Guide1 min readUpdated

Why it matters

Component interactions must ACK fast; version custom_id and never store secrets there.

Practical steps

  1. Version custom_id prefixes
  2. ACK or defer within about three seconds
  3. Disable buttons after one-shot actions
  4. Authorize the clicking user server-side
  5. Reply ephemeral on unauthorized clicks

Watch out for

  • Copy-pasting outdated snippets for discord components buttons without re-reading current official docs.
  • Shipping discord components buttons to production without a staging rehearsal and a documented rollback.

Related comparisons and tools