Docs & Tutorials

Deep documentation for every feature in Discord Bot Factory.

A full walkthrough of the app, the flow system, and step-by-step tutorials to build real bots.

Introduction

Discord Bot Factory (DBF) is a desktop, node-based builder for Discord bots. Design triggers and actions in the Flow Editor, test flows instantly in the Playground, and run the bot directly from the app. Each project lives in a folder and generates a Discord.js bot you can host anywhere.

What you build

  • Message-based triggers: prefix commands, contains, starts with, regex, mentions, attachments.
  • Action chains that reply, embed, moderate, manage roles, and more.
  • A Discord.js bot generated from your flow.

What to expect

  • Everything runs locally. You start and stop the bot from the top bar.
  • Playground simulates replies and variable resolution for fast testing.
  • Projects live in dedicated folders for easy backups and sharing.
Introduction overview placeholder

Quickstart

  1. Create a project from Home or Projects > New Bot.
  2. Pick a name, choose a folder, select Starter or Blank template.
  3. Open Bot Settings, paste your bot token, set a prefix, Save.
  4. In Flow Editor, add a New Command node and a Reply node.
  5. Connect Command > Reply, set reply text, then save.
  6. Open Playground, send !ping and confirm the reply.
  7. Start the bot (F5), then generate an invite link in Bot Settings.
Tip: Use the Token Help button in Bot Settings to enable intents and copy the token safely.
Quickstart placeholder

Core concepts

Flows are built from Event nodes and Action nodes. Event nodes are entry points that decide when a chain runs. Action nodes do the work.

  • Every Event node creates a separate match block. The first match runs, then the flow returns.
  • Message Event is a catch-all and runs last by design.
  • Action order follows the order you connect nodes. Reconnect to change order.
  • Branching is allowed: connect one output to multiple actions.
  • New Command matches exact messages. For args, use Message Starts With or Message Regex and read {args}.
  • If an Event has no connected Actions, it does nothing at runtime.
Core concepts placeholder

New project

The new project modal builds your project folder and loads the template flow.

  1. Choose a project name (use the dice button for random names).
  2. Pick a folder. Use Default if you set one in Preferences.
  3. Select a template: Starter (Message Event > Reply) or Blank.
  4. Create the bot and wait for the loading overlay to finish.

Blank template starts with an empty canvas. Starter includes a sample Message Event > Reply flow.

New project modal placeholder

Bot settings

Bot Settings are per-project. They control the bot name, token, prefix, and invite link.

Fields

  • Project Name and randomize button for quick naming.
  • Bot Token with show/hide toggle.
  • Command Prefix used by New Command nodes.

Preview

  • Token preview pulls avatar, name, and bot ID.
  • Click the ID chip to copy it.
  • Invalid token or missing prefix fields are highlighted.

Invite

  • Generate Invite Link uses your token and default permissions.
  • Copy or open the invite link after generation.
  • Invite permissions are set in Preferences.
Bot settings placeholder

Token help and intents

Use the Token Help button for a guided walkthrough.

  1. Open the Discord Developer Portal and create a new application.
  2. Open the Bot tab and enable Presence, Server Members, and Message Content intents.
  3. Reset the bot token, copy it, and paste into Bot Settings.

Never share your token. Anyone with it can control your bot.

Token help placeholder

Invite permissions

Invite links include a permission integer that defines what your bot can do when added to a server.

  • Edit default permissions from Preferences > Default invite permissions.
  • Search and toggle permissions in the builder, or enable Administrator.
  • The permission integer updates live and is applied to generated invites.
  • Match permissions to your node usage (Manage Messages, Manage Roles, etc).
Invite permissions placeholder

Preferences

Preferences are global and apply to every project on this machine.

Projects and safety

  • Default Project Folder for new bots.
  • Auto-load last project on startup.
  • Prompt before using an existing project folder.
  • Disable confirmation dialogs (advanced).

UX and rendering

  • Hide username in paths for screenshots.
  • Reduce motion and toggle tooltips.
  • Graph resolution for sharper or faster rendering.
  • Zoom wheel sensitivity and button animation duration.

Defaults and onboarding

  • Auto-save interval (off, 1m, 5m).
  • Default command prefix for new projects.
  • Default invite permissions.
  • Sound cues and Run tutorial button.
Preferences placeholder

Canvas and panels

The Flow Editor is your main workspace for building bot logic.

  • Pan by dragging empty canvas. Zoom with buttons, scroll, or pinch.
  • Toggle grid (G) and custom connection routing (L).
  • Flow help panel can be collapsed from the top-left toggle.
  • Right debug panel shows the Bot Log.
  • Resize sidebars and debug panels with the handles.
Flow canvas placeholder

Node selector

Add nodes quickly from anywhere on the canvas.

  • Right-click or double-click empty canvas to open the selector.
  • Search by node name, category, or description.
  • Use arrow keys and Enter to add a highlighted node.
  • Press Escape or click outside to close the selector.
Node selector placeholder

Node properties

Double-click a node to edit its settings.

  • Each field supports the Insert variable menu.
  • Use the search bar to filter the variable list quickly.
  • Variables are case-insensitive and replaced at runtime.
  • Command nodes show the current prefix as a pill.
  • Saving applies changes; closing may prompt if edits exist.
Node properties placeholder

Template variables

Use curly braces inside text fields, like {user.name}. Variables are case-insensitive and can be inserted from the property menu.

Bot

  • {bot.name} - bot username
  • {bot.id} - bot user id
  • {bot.tag} - bot tag
  • {bot.avatar} - bot avatar URL
  • {bot.avatarUrl} - bot avatar URL
  • {bot.mention} - bot mention
  • {bot.createdAt} - bot account created ISO timestamp
  • {bot.prefix} - current command prefix

Channel

  • {channel.name} - channel name
  • {channel.id} - channel id
  • {channel.mention} - channel mention
  • {channel.topic} - channel topic
  • {channel.type} - channel type
  • {channel.parentId} - parent id
  • {channel.createdAt} - channel created ISO timestamp
  • {channel.nsfw} - true/false
  • {channel.position} - channel position
  • {channel.slowmode} - slowmode seconds

Server

  • {server.name} - server name
  • {server.id} - server id
  • {server.ownerId} - owner id
  • {server.memberCount} - member count
  • {server.iconUrl} - server icon URL
  • {server.defaultChannel} - default/system channel mention
  • {server.createdAt} - server created ISO timestamp

Command and args

  • {command.name} - command name (raw)
  • {command.nameNormalized} - normalized command name
  • {command.args} - args text after command
  • {command.prefix} - prefix used for the match
  • {command.full} - prefix + command
  • {args} - args joined as text
  • {args.list} - args as comma list
  • {args.count} - number of args
  • {args.raw} - raw text after prefix

User

  • {user.name} - username
  • {user.id} - user id
  • {user.tag} - user tag
  • {user.nickname} - server nickname
  • {user.mention} - user mention
  • {user.avatar} - avatar URL
  • {user.avatarUrl} - avatar URL
  • {user.createdAt} - user created ISO timestamp
  • {user.joinedAt} - server join ISO timestamp
  • {user.roles} - role names list
  • {user.rolesIds} - role ids list

Message

  • {message.id} - message id
  • {message.link} - message link
  • {message.content} - message content
  • {message.createdAt} - message created ISO timestamp
Template variables placeholder

Embed builder

The Send Embed node includes a live preview with Discord-style formatting.

  • Title (max 256) and Description (max 4096).
  • Color uses hex values like #5865F2.
  • Optional fields: URL, author, thumbnail, image, footer.
  • Add up to 25 fields. Each field has name, value, and inline toggle.
  • Variables work in every text field.
Embed builder placeholder

Flow execution model

When you start the bot, the flow graph is converted into JavaScript logic.

  • Each Event node becomes an if block. The first match runs and returns.
  • Message Event is treated as catch-all and evaluated last.
  • Actions run in link order and can branch into multiple chains.
  • Disconnected nodes are ignored at runtime.
  • If no Event connects to an Action chain, the bot does nothing for that message.
Flow execution placeholder

Node reference

All nodes currently available in Discord Bot Factory.

Events

  • Message Event - catch-all for any message.
  • New Command - command text; case-insensitive, matches with or without prefix, exact match only.
  • Message Contains - phrase; case-insensitive.
  • Message Starts With - startsWith text; case-insensitive, no prefix required.
  • Message Regex - pattern and flags (gimsuy).
  • Bot Mentioned - triggers on bot mention.
  • Has Attachment - triggers when attachments exist.
  • DM Only - triggers only in direct messages.
  • Guild Only - optional guildId to limit to a server.

Actions

  • Reply - replyText to reply in the same channel.
  • Send Message - channelId (optional), messageText.

Messaging

  • Send Embed - rich embed builder (see Embed section).
  • DM User - userId (optional), messageText.
  • Add Reaction - emoji (standard emoji or custom emoji id).
  • Remove Reaction - emoji (standard emoji or custom emoji id).
  • Clear Reactions - remove all reactions.
  • Send Typing - show typing indicator.

Moderation

Requires server context and permissions like Manage Messages, Moderate Members, or Manage Roles.

  • Delete Message - messageId (optional), reason.
  • Pin Message - messageId (optional).
  • Unpin Message - messageId (optional).
  • Add Role - roleId, userId (optional).
  • Remove Role - roleId, userId (optional).
  • Kick Member - userId (optional), reason.
  • Ban Member - userId (optional), reason, deleteSeconds.
  • Unban Member - userId (optional), reason.
  • Timeout Member - userId (optional), minutes, reason.
  • Set Nickname - userId (optional), nickname.

Channels

Requires channel permissions like Manage Channels or Manage Messages.

  • Purge Messages - amount (1-100).
  • Set Slowmode - seconds, reason.
  • Set Channel Topic - channelId (optional), topic.
  • Create Invite - channelId (optional), age, uses, temporary.

Presence

  • Set Presence - status (online/idle/dnd/invisible) and activity.

Utility

  • Console Log - text logs to Bot Log for debugging.
Node reference placeholder

Playground overview

Playground runs locally so you can test responses quickly before going live.

  • Simulates messages and node actions using your current flow.
  • Shows embed previews and variable replacements.
  • Updates as soon as you edit the graph.
Playground overview placeholder

Run your bot

  1. Set a valid token and prefix in Bot Settings.
  2. Save your project (Ctrl/Cmd+S).
  3. Start the bot with F5 or the Start Bot button.
  4. Stop the bot with Shift+F5 or the Stop Bot button.
  5. Restart is available when the bot is running.

Starting the bot generates flow code and logs it to the Bot Log panel.

Run bot placeholder

Bot log

  • Shows generated flow code and runtime output.
  • Use the Copy Log button to share with support or teammates.
  • Errors include token failures, permission issues, and runtime logs.
Bot log placeholder

Troubleshooting

  • No response in Discord: confirm the bot is running, token is valid, and intents are enabled.
  • Command not matching: verify the prefix and command text. Commands match exact content; use Message Starts With for args.
  • Only one trigger fires: first matching Event node runs and returns. Order matters.
  • Moderation actions fail: ensure the bot has the right permissions and is in a guild.
  • Purge fails: amount must be 1-100 and Discord cannot bulk delete old messages.
  • Invite generation fails: set a token first, then regenerate the link.
Troubleshooting placeholder

Tutorials hub

Pick a guide below to open a full, step-by-step walkthrough.

Ping command

Create your first command with a Reply node and a variable.

Help embed

Build a rich embed response with fields and colors.

Purge command

Bulk delete recent messages using a numeric argument.

Invite command

Generate an invite link with custom age and uses.

Status command

Set bot presence using text from the command.

Tip: For moderation, role, and channel commands, update Invite permissions so the bot has the matching Discord permissions.
Tutorials hub placeholder

Ping command

Build a simple command that replies in the same channel.

  1. Add a New Command node and set command to ping.
  2. Add a Reply node and set replyText to Pong, {user.name}!.
  3. Connect Command > Reply and save.
  4. Open Playground and send !ping.
  5. Start the bot (F5) and test in Discord.
Tip: New Command matches exact content. Keep the command text short and clean.
Ping command tutorial placeholder

Help embed

Create a rich embed response with fields and consistent formatting.

  1. Add a New Command node with help.
  2. Add a Send Embed node and connect it.
  3. Set Title, Description, and a color.
  4. Add fields like ping and invite.
  5. Test in Playground to see the embed preview.
Tip: Use the Embed builder preview to tune spacing and field layout.
Help embed tutorial placeholder

Purge command

Bulk delete recent messages using a numeric argument.

  1. Add a Message Starts With event node with !purge.
  2. Add Purge Messages and set amount to {args}.
  3. Optional: add Reply or Console Log after purge.
  4. Ensure the bot has Manage Messages permission.
  5. Run !purge 10 to delete 10 recent messages.
Tip: Use Message Starts With to read the number after the command.
Purge command tutorial placeholder

Invite command

Generate an invite link with age and usage limits.

  1. Add a New Command node with invite.
  2. Add Create Invite and connect it.
  3. Set max age, max uses, and temporary if needed.
  4. Ensure the bot has Create Invite permission.
  5. Use !invite to reply with a link.
Tip: Set max age to 0 for a link that never expires.
Invite command tutorial placeholder

Status command

Set bot presence using text from the command.

  1. Add a Message Starts With event node with !status.
  2. Add Set Presence and connect it.
  3. Set Status to online and Activity Type to PLAYING.
  4. Set Activity Name to {args} for dynamic text.
  5. Use !status building bots to update presence.
Tip: Activity Name supports variables like {server.name}.
Status command tutorial placeholder