-
Notifications
You must be signed in to change notification settings - Fork 0
components v2 research
buildsbypat edited this page May 24, 2026
·
1 revision
- Discord Components reference says buttons must be inside an Action Row or in a Section
accessory. - Container is a layout wrapper and can hold layout/content components; interactive buttons still must follow button placement rules.
- Runtime verified on discord.py 2.7.1 (
discord.__version__ == 2.7.1). -
discord.ui.Container,ActionRow,Section,Button,TextDisplay, andLayoutVieware present. - Valid, supported pattern for two buttons is
Container+ActionRow(button1, button2)in the sameLayoutView. -
Section(..., accessory=Button(...))is valid when you need one accessory button.
- Directly inspected
/Users/patfaint/Documents/rob-the-bot-legacy. - Relevant references:
-
bot/ui/components.py:action_section(text, button)usesSection(..., accessory=Button(...)). -
bot/event_views.py: container-first views with section accessories and separators. -
bot/event_cog.py:SendRequestDecisionViewand leaderboard upsert flows.
-
- Old bot patterns confirm container-first layouts with button accessories were used successfully.
- Rob keeps container-first cards and never places raw top-level
Buttonobjects inLayoutView. - Two validated patterns are used:
-
ActionRowfor button groups (add_card_actions(...)helper). -
Section(..., accessory=Button(...))for compact inline action prompts.
-
-
/sendrequestDom/me review cards currently use the validatedSectionaccessory button pattern.
-
Adopted container-first card templates with action rows (no raw top-level buttons).
-
Documented fallback policy and old-Rob copy parity targets.
-
2026-05-23: Public send card now uses compact Components V2 layout with real
discord.ui.Separator()and purple accent constants fromrob/ui/theme.py; rank lines/footer removed. -
2026-05-23: Added NEW LEADER ALERT card (purple accent, separator-based sections) with bot-state dedupe.
-
2026-05-23: Leaderboard and stats cards now use explicit separator components; stats include Unclaimed Sends section.
-
2026-05-23:
/sendrequestDM review cards use container + section accessory buttons; helper support for container + action-row remains available where grouped buttons are preferred.