serenity-interactions

Implement Discord button, select, and modal interactions in Rust with Serenity.

Updated Jan 9, 2026
One-click install
npx skills add https://github.com/ErdemGKSL/open-guard-rs --skill serenity-interactions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serenity-interactions
Source: https://github.com/ErdemGKSL/open-guard-rs/tree/main/.opencode/skill/serenity-interactions
Command: npx skills add https://github.com/ErdemGKSL/open-guard-rs --skill serenity-interactions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides practical guidance for implementing and handling Discord interactions (buttons, selects, modals) within the Open Guard bot, helping developers craft responsive, non-blocking UI flows.

Core Features & Use Cases

  • Button interactions: implement and respond to button clicks without delaying commands.
  • Select menus and modals: handle dropdowns and form submissions with proper acknowledgment and editing strategies.
  • Event-driven integration: wire interaction handlers into the bot's event system and transport data via custom_id.
  • Best practices: separate command execution from interaction handling, and use acknowledge-then-edit patterns.
  • Use case: add a conversational setup flow that collects user input via modals and updates messages in place.

Quick Start

Review the Serenity Interactions skill and implement basic button handling following the patterns:

  • Wire an event handler that listens for Component interactions and delegates to a dedicated function.
  • Use create_response(Acknowledge) to acknowledge interactions, then edit the original message with results.
  • Transport data using custom_id parsing to pass context between commands and handlers.

Frequently Asked Questions about serenity-interactions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle Discord button interactions in Rust without blocking command execution?

To handle Discord button interactions without blocking commands, separate interaction handling from command logic by wiring a dedicated event handler that delegates component interactions to a specific function.

What is the best way to manage Discord modal submissions and select menus in a Serenity bot?

The best way to manage Discord modals and select menus is using an acknowledge-then-edit flow, where you acknowledge the interaction first and then edit the original message with the submission results.

How does custom_id data transport work for Discord interactions in Poise?

Custom_id data transport works by parsing the custom_id field to pass context and metadata between command execution and the dedicated interaction event handlers.

Do I need to know Rust and Serenity to implement Discord modals and buttons for Open Guard?

Yes, you need familiarity with Rust and the Serenity or Poise libraries to implement Discord interactions like buttons and modals within the Open Guard bot architecture.

Why does my Discord interaction fail when I try to process a modal submission and respond immediately?

Discord interactions fail when processed immediately because command handlers must remain non-blocking; you must acknowledge the interaction first, then edit the message with the processed results.