Starts with a slash command and a button
Mini-games
/higher-lower deals a card and the player guesses with two buttons, which passes the time while the voice lobby fills up. The best streak is saved per member, and nobody else can press the buttons on your round.
Illustration. The real interface may look different.
How it works
/higher-lower deals a card and shows a Higher and a Lower button.
Only the member who started the round can press them.
Every right guess adds to the streak, and the best streak is saved per member.
How to make a mini-game on Discord
A round lives in storage under the ID of its own message, so ten members can play at once. Each button starts its own flow, and both call one shared flow that draws the card.
Describe it to your AI assistant
Our voice lobby takes ages to fill and people get bored waiting. Build a higher or lower card game as a module: /higher-lower shows a card with Higher and Lower buttons that only the player can press. A right guess draws the next card and adds to the streak, a wrong one ends the round. Remember each member's best streak, make sure two fast clicks cannot both count, and clear unfinished rounds every night at 4:00. Also add a single flow: /coinflip with Heads and Tails buttons that waits a minute for my pick.
Copy it and swap in your own channel and role names. Your assistant has a tested version of this example to start from.
Build it in the editor
Higher or lower takes four kinds of flow: the deal, one per button, a shared flow that draws the next card, and a nightly clean-up. The coin flip is a single flow.
The 4 flows, step by stepStep names are the ones the editor shows.
Flow 1/higher-lower
Trigger: Slash command/higher-lower, with a five-second cooldown per member.
- Random whole numberDraws the first card.
- Create messageBuilds the message with the Higher and Lower buttons.
- Reply to interactionAnswers the command with it.
- Build a shape valuePacks card, streak and player into one value.
- Store a valueStores the round under the ID of that message.
Flow 2Higher and Lower
Trigger: Button clickedone flow per button.
- Read a stored valueReads the round. If it is gone, the member is told the round is over.
- EqualsCompares the player with the member who clicked. Anyone else is sent to their own /higher-lower.
- Call another flowRuns the shared flow with the card on the table and this button's guess.
- Increment if (atomic)Claims the turn, so a double click plays one card.
- Update messageRewrites the message with the new card and the streak.
- Delete a stored valueOn a wrong guess, deletes the round. Best streaks are stored separately and stay.
Flow 3Draw the next card
Trigger: Manual triggercalled by both button flows.
- Random whole numberDraws the next card.
- Greater thanCompares it with the card on the table.
- Return from flowHands back the card and whether the guess was right.
Flow 4Nightly clean-up
Trigger: Scheduleevery night at 04:00.
- Clear storage fieldClears the rounds nobody finished. Best streaks are kept.
Install it from the marketplace
Wortsalat and Hau den Maulwurf are finished games on the marketplace. Both are in German.
Test it, change it
What it stores
- RoundBy custom keyCard, streak and player of a running round, filed under its message ID.
- TurnBy custom keyHow many guesses a round has accepted. This is what stops double clicks.
- Best streakPer userThe longest streak per member. It is never cleared.
How to test it
- Open a flow in the editor and click "Test run". Choose the member under "Run as" and click "Run test". The run uses your real server data but sends, changes and deletes nothing, and shows what each step would have done.
- A new flow is a "Draft" and does not run in Discord. Switch it on and click "Save & activate".
- Play a round in Discord, then click a button on it from a second account. That click should be refused.
- Each real run then shows up under "Executions", with the reason if it failed or was skipped.
What to change
- Channel
- The game answers where the command is used. Limit /higher-lower to your games channel in Discord under Server Settings, Integrations.
- Streak goal
- The "Streak goal" setting in the module's "Configuration" tab is the streak the bot celebrates in chat.
- Cards
- The range in the two "Random whole number" steps. The tested version draws 2 to 13.
- Wording
- The messages are built in the deal flow and in both button flows.
Watch out for
- Higher and Lower are two flows with the same steps. Change one and you have to change the other.
- A round left open overnight is gone after the 04:00 clean-up, and its buttons answer that the round is over.
- The coin flip waits 60 seconds for the click. After that its buttons are switched off.
Questions about this build
Can other members press the buttons on my round?
They can click, but the flow compares them with the player who dealt the card and answers privately that this is someone else's round.
Can the game pay out coins?
Yes. Raise the member's wallet from the coin shop example in the button flows when a guess is right. Both builds can share one stored field.
Are there finished games I can install?
Two are on the marketplace as modules, both in German: Wortsalat and Hau den Maulwurf. The links are further up this page. Your bot also comes with a games module.
More examples
Vēlies savu serveri betā?
V3 ir liela sistēma, kas joprojām strauji mainās, tāpēc serveri tiek uzņemti pa vienam, nevis visi uzreiz. Katru pieteikumu izlasa cilvēks, un atbildi saņem dažu dienu laikā.
Serveri, kas jau ir betā, lielā mērā nosaka, ko veidosim tālāk. Tas, ko tu izveido, ir tavs: flows un moduļi paliek arī pēc beta beigām.