Coding Your Bot
Your project exists and your bot is set up. Now for the part that makes it do something.
Open your project
Go to Projects in the dashboard and click Open on your project.

What you are looking at

Three things matter to start with:
- The toolbox down the left, holding every block DisFuse has.
- The canvas in the middle, where you build.
- The toolbar across the top, with File, Utilities, Versions, Invite and Export.
The Editor covers all of it in detail.
Your first blocks
Every bot needs one block before anything else: the ready event.
- Click Main in the toolbox.
- Drag
when the bot is logged inonto the canvas.
Everything that has to happen as soon as your bot connects goes inside it. That is where you register slash commands and set the bot's status.
There is no "log in with token" block any more. Your bot token lives in project settings, so it can never end up in a screenshot of your blocks or in a project you shared. If you are following an older tutorial that tells you to drag a token block, skip that step.
Making a command
The shortest path to a working bot is a slash command.
- Open Interactions, then Slash.
- Drag
create slash commands / context menusinsidewhen the bot is logged in. - Put your test server's ID in the test guild field while you are building, so commands appear straight away.
- Drag
add slash commandinside that, and give it a name and a description. - Drag
when a slash command is receivedonto the canvas, on its own. - Inside it, check
name of the commandmatches yours with anifblock from Logic. - Inside the
if, usereply to the interactionfrom the same category, with a text display holding your reply.
Slash Commands walks through this in full, with screenshots of every block.
Utilities > Templates loads a working slash command setup into your workspace, so you can see the shape before building your own. See Templates.
Where things are
| You want to | Look in |
|---|---|
| Send a message | Channels, then build it with Components |
| React to somebody joining | Server Actions |
| Ban, kick or time out a member | Members |
| Give somebody a role | Roles |
| Remember something between restarts | Databases |
| Add a button | Buttons |
| Talk to another website | Fetch |
The Blocks section has a page for every category.
Saving
DisFuse saves as you work. The toolbar shows the state: saving, saved, or an error if something went wrong.
If you want a snapshot you can come back to, use Version Control.
Checking your work
File > Show Code shows the JavaScript your blocks produce.

You do not need to understand it to use DisFuse. It is useful for two things: confirming a block does what you expected, and giving somebody in the support channel something concrete to look at.
Next
When your bot does something worth seeing, export it and run it.