Building
Step-by-step flow recipes
Build a command, a role button, a form and a safe API lookup.
Recipe 1: a private help command
Connect Slash Command (
name=help) → Reply (content=Choose a command from the menu., ephemeral=true). Publish and run /help. Expected: only the caller sees the reply. If it is absent, check publication before editing message styling.Recipe 2: a self-service role button
Send a message with a button whose Custom ID is
get_news. Add Button Click (customId=get_news) → Add Role (user {user}, a fixed harmless news role) → Reply (ephemeral=true). The bot needs Manage Roles and a higher role. Expected: the clicking member gets only that fixed role. Test with a non-admin; do not accept an unrestricted role supplied by the user.Recipe 3: a form with its own submission
Connect Slash Command → Show Modal (
customId=feedback_form, title “Feedback”). Add the form's input fields in its editor. Create Modal Submit with exactly feedback_form, then Reply with a private acknowledgement. Expected: the initial command opens the form and submitting triggers a separate response. Do not place an initial Reply or Defer Reply before Show Modal.Recipe 4: a safe API read
Connect Slash Command → Defer Reply → HTTP Request to a public HTTPS read endpoint → Reply. Configure the response prefix and use the block's supported output fields. Connect failure output, when offered, to a short error response. First use an endpoint without credentials; later add secrets through supported configuration, never inline in a public message.
Recipe 5: welcome event
Member Joined → Send Message (fixed welcome channel,
Welcome {user}!). Enable member intent and publish. Expected: a real joining member receives a channel greeting; Reply is not the right block because no interaction exists.