Groups and panels
A rule has one trigger. A panel has several buttons. In FlaviBot, a group is what bridges the two: a set of rules plus the messages that host their buttons, edited in a single place. A group can hold one panel, several, or none at all — and a rule can sit in a group without any button pointing at it.
Group "Support"
├── panel "Open a ticket" (#support)
│ ├── button "Billing" → rule: Ticket: billing
│ ├── button "Bug" → rule: Ticket: bug
│ └── button "Other" → rule: Ticket: other
├── panel "FAQ" (#faq)
│ └── dropdown → rule: FAQ answers
├── rule: Auto-close idle tickets (no button — runs on a schedule)
└── rule: Ping staff on a new ticket (no button — runs on a message)
How a click finds its rule
Every component carries an id that points straight at a rule. The bot reads that id and runs that rule; it never consults the group or the panel. Two consequences worth knowing:
- Deleting a group deletes its rules and its panels with it — a group is the whole thing, and removing it must leave nothing running behind your back.
- A rule can live outside any group and still be wired to a button you place yourself.
Building one
Create a group, add rules to it, then add a panel: give it a name, pick the channel it goes in, and compose its message in the builder. When you edit a button you pick the rule it runs from the group's rules; the raw id is shown next to each rule too, for a button you build elsewhere.
Every panel is published on its own. Publishing posts the message in the panel's channel. Publish again after an edit and the same message is updated in place; if it was deleted, a fresh one is posted. Until you republish, the group page marks the panel to republish so a saved change is never silently different from what members see.
The group page lists rules with the panel they belong to. Filter on No panel to see the rules nothing points at — the ones that run on their own triggers, or that you have not wired to a button yet.
Panels that talk back
A button rule can edit the message it was clicked on. That is how a counter refreshes itself: read the stored value, rewrite the card with the new number.
A rule can also send a message whose buttons point at the group's other rules, the "second chance" honeypot works exactly that way.
Forms
A button can open a form before the rule runs. Up to 5 fields, short or
paragraph, required or not. Each answer becomes {modal.<field>}.
A form has to belong to the trigger rather than to an action, and that is not an arbitrary restriction: Discord demands an answer to a click within three seconds, long before a workflow could decide to open one.
The panel as a live scoreboard
A rule inside a group can address a panel without knowing its message id:
{panel.message_id},{panel.channel_id},{panel.name}— the panel the rule's own button sits on. Blank for a rule no panel points at.{group.panel_message_id},{group.panel_channel_id}— the group's primary panel (marked with a star on the group page; the first one you create, unless you pick another). Handy for a rule that runs without a button but still wants to refresh the group's main message.
That is what turns a panel into something that updates itself: the rule that increments a counter can, in the same run, rewrite the panel and put the new number in a button label.
The curated Honeypot preset does exactly that. Each ban increments a stored counter and rewrites the panel, so the button reads "Caught so far: 12" without anyone clicking anything.
These variables only appear for a rule that belongs to a group, and they are only looked up for a rule that actually mentions one, so an ordinary role button in a group costs nothing extra.
Data shared inside a group
A group is not only its messages: it is also a namespace. A data variable stored with the This group only scope is readable by every rule of the group and by nothing else on the server.
That matters for two reasons. A panel's own bookkeeping stops leaking into the
server-wide names, so two rules called pick in two different panels are two
different values. And the same preset can be installed twice: the copies do not
overwrite each other, because a variable name is fixed by the preset author and
could never be made unique per install.
The scope only appears on a rule that belongs to a group, since outside one there is no group to store against. Deleting a group deletes its variables with it.
