Build your first flow
A complete walkthrough: from a blank Discord application to a live slash command, then ready-made recipes for the most common bot types.
Part 1: get a bot online
- 1Create the Discord application
Go to the Discord Developer Portal, create an application, then open its Bot page. Enable Server Members Intent and Message Content Intent - member joins, keyword triggers, and prefix commands all need them. Copy the token (you will only see it once - regenerate if you lose it).
- 2Add it to Styz
On builder.styz.gg, create a bot and paste the token and Application ID. The Builder logs the bot in and keeps it online from there.
- 3Invite it to your server
Use the invite link the dashboard generates - it carries the
botandapplications.commandsscopes plus the permissions your nodes need. Grant the bot role high enough position to manage the roles your flows touch, and permissions like Manage Roles / Manage Channels / Kick / Ban / Timeout depending on what you plan to use.
Part 2: a welcome flow (event)
Easiest real bot feature: greet new members. No command needed - the trigger is the event.
- 1New flow, trigger = Member joined
In the bot's Flows tab, create a flow named
welcomeand set the trigger to Member joined. Set its output channel to your welcome channel. - 2Add a Send message step
Drop a Send message node on the canvas and wire the trigger's output to it. Set the text to something like:
Welcome {user} to {server}! You are member #{memberCount}. - 3Optionally auto-assign a role
Chain an Add role node after the message with your member role's ID - the member who joined is the target automatically.
- 4Save
Event flows go live on save - no sync needed. Have a second account join, or use Simulate to preview it.
Faster path: apply the Welcome + Autorole template from the Templates button - it installs this exact flow pre-wired.
Part 3: a slash command with a typed input
A staff command that warns a member and logs it - the pattern behind most moderation flows.
- 1New flow, trigger = Command, name = warn
Name it
warn- that becomes/warnin Discord. Give it a description ("Warn a member and log it") - that is the text members see in the command picker. - 2Add two typed options
In the options editor add a required user option named
userand an optional string option namedreason. Discord renders these as a user picker and a text field. - 3Gate it to staff
Set Allowed roles to your staff role ID - non-staff who try it get a refusal, not an error.
- 4Wire the steps
Data: counter (scope: user, key
warns, target{optionId:user}, save towarnCount) -> Send embed in-channel:{option:user} was warned. Reason: {option:reason} - warn #{var:warnCount}-> optionally a second Send embed to your mod-log channel via its channel ID. - 5Save and sync
Save the flow, then hit Sync commands. The slash command appears in your server within moments - guild registration is near-instant, unlike global commands.
Recipes
Building blocks for common bot types. Each is a starting point - combine and extend.
Moderation: /ban with reason + DM notice
Trigger: Command (name: ban) with a required user option and a string reason option, allowedRoles = your mod role.
Steps: DM user the target first ({optionId:user}) so they see the reason even if the ban blocks DMs after -> Ban member ({optionId:user}, reason {option:reason}) -> Send embed confirmation -> log to your mod channel.
The bot needs the Ban Members permission and a role above the target's highest role - check both in Discord's role list if bans silently fail.
Gaming/economy: /daily with cooldown
Trigger: Command (name: daily), no options needed.
Steps: Daily reward (save its claimed flag to a variable) -> If variable on that flag -> then: Check balance into {var:balance}, Send message 'You claimed {var:dailyAmount} coins - balance: {var:balance}' -> else: Send ephemeral 'Come back in {var:dailyTimeLeft}'. The node enforces the 24h window itself.
Scoreboard: /points + /scoreboard
Trigger: Two commands. /points: staff-gated, user + integer options. /scoreboard: public.
Steps: /points: Data: counter (key points, target {optionId:user}, amount {option:amount}) -> confirm embed. /scoreboard: Leaderboard (key points) -> post it. /resetscores: Leaderboard first (the permanent record), then Data: clear all on points.
Server logs: deleted-message log
Trigger: Message deleted, output channel = your log channel.
Steps: Send embed with {user} / {channel} / {content} / {messageId}. Pair with Message edited for {oldContent} -> {content} diffs, and Server changed for channel/role create/delete events.
Reaction roles
Trigger: Apply the Reaction Roles template - it installs a setup command plus the reaction handlers.
Steps: /setup-roles posts a menu message; members reacting get the mapped role and lose it on unreact. Backed by the persistent systems store, so it survives restarts.
Conditional content: role-gated command
Trigger: Command (name: secret) - left public so anyone can try it.
Steps: Condition (member has role = VIP role ID) -> then: Send message with the VIP content -> else: Send ephemeral 'This needs the VIP role'. Branching keeps the gate in the flow rather than a hard lockout.
Reminders that survive restarts
Trigger: Command (name: remindme) with a string text option and an integer minutes option.
Steps: Reminder node (delivery: DM or channel, text from {option:text}, minutes field accepts {option:minutes}) -> ephemeral confirm. Persisted in the data store and swept every minute - a bot restart does not lose it.
When something does not work
| Symptom | First thing to check |
|---|---|
| Command does not appear in Discord | Hit Sync commands, then reload Discord (Ctrl+R). Check the flow is enabled and named in lowercase. |
| Command runs but does nothing | Logs tab on the bot - permission failures and missing configs are reported there per-run. |
| Role/channel steps fail | The bot's own role must sit above the roles it manages, and it needs the specific permission (Manage Roles, Manage Channels). |
| Members get "not allowed" | Allowed roles/channels on the flow - blank means everyone. Remember the owner bypass only applies to you. |
| A flow stopped running entirely | The circuit breaker disables a flow after 5 consecutive errored runs - fix the error in Logs, then re-enable it. |
| Event triggers silent | Privileged intents in the Developer Portal (Server Members, Message Content), plus an output channel on the trigger. |