Custom Commands docsCustom CommandsDocs

Search docs

Find a page, function or guide

HomeSupportDashboard

Getting started

  • Introduction
  • Your first command
  • How a command runs
  • Variables in replies
  • Text commands
  • Events
  • Using Slushy

Guides

  • Welcome messages
  • Role menus
  • Auto moderation
  • Automations
  • Forms
  • Tickets
  • Social alerts
  • Moderation commands
  • Levels and XP
  • Economy and coins
  • Ticket system with code
  • Giveaways
  • Poll
  • Button game
  • Reminders

Concepts

  • Buttons and menus
  • Forms
  • Saving data
  • Permissions and cooldowns
  • Limits and premium
  • Common mistakes

API reference

  • Response
  • Messages
  • Embeds
  • Members and roles
  • Channels
  • Storage
  • Checks
  • Views
  • Components
  • Modals
  • Interactions
  • Paginators
  • Web and files
  • Leveling
  • Scheduling
  • Server events and polls
  • Time
  • Waiting
  • Utilities
  • Objects
  • Event variables

Examples

  • /8ball
  • /coinflip
  • /avatar
  • /serverinfo
  • /rank
  • /remind

Guides

View .md

Automations

Make the bot do things on its own with no code. Pick what starts it, add checks, then the actions.

An automation is a small flow the bot runs by itself. You build it on a canvas, block by block:

  1. When: what starts it. For example, a member joins.
  2. If: optional checks. For example, the account is older than 7 days.
  3. Do: what the bot does. For example, give a role and send a message.

No code is needed. Open Automations on the dashboard.

Note

Automations is a premium feature and is in beta. On the free plan you can see the page, but you can't build or run automations.

Tip

The fastest start is a template. Open Templates, pick one, press Use template, then fill in the role or channel it asks for.

Build one#

  1. Open Automations and press New automation.
  2. Pick a template, or Start blank and choose a trigger.
  3. Add blocks. Press the + under a block to add the next one, or drag one in from the left panel.
  4. Click a block to change its settings on the right.
  5. Press Test run to see the path it would take, without doing anything for real.
  6. Press Publish. The automation is now live.

Your edits save on their own as a draft. The bot only runs the published version, so a half-finished change never runs. Discard goes back to what is live.

Triggers#

Each automation has one trigger.

GroupTriggers
MembersJoins, leaves, gets a role, loses a role, changes nickname, boosts the server, levels up, fills in a form
MessagesSends, edits or deletes a message, mentions the bot, creates a thread
ReactionsAdds or removes a reaction
ButtonsClicks a button, picks from a menu, sends a form
VoiceJoins, leaves or moves voice channel
OtherOn a schedule, votes for the bot

Most triggers can be limited to some channels. Buttons, menus and forms match by their custom ID.

Cooldown#

A trigger can have a cooldown, so it runs at most once in a while. Pick per member, per channel or whole server, and a time. For example, an auto-reply with a 60-second cooldown per channel answers once a minute, however many people ask.

Checks (If blocks)#

An If block checks rules, then goes down Yes or No.

  • All of these: every rule must be true.
  • Any of these: one rule is enough.
  • None of these: no rule may be true.

Groups can go inside groups, up to 4 deep. Each rule can also be flipped to is not.

Rules include: channel or category, roles (any, all or none), specific users, bots, account age, time in the server, boosting, message text (contains, is exactly, starts with, matches a pattern), attachments (image, video, audio, file), replies, mentions, links, message length, the reaction emoji, time of day, day of the week, comparing a value, and random chance.

Actions#

GroupBlocks
MessagesSend a message, send a DM, reply, react, delete, pin, create a thread
MembersGive a role (for good or for a while), take a role, set nickname, time out, kick, ban, move or disconnect from voice
ChannelsSet slowmode, lock, unlock
DataSet a value, do math, save a server or member value

Messages use the same editor as the rest of the dashboard, with embeds and buttons.

Note

Give a role can't give a role with staff permissions, like Administrator or Ban Members. That stops anyone from handing themselves power through an automation.

Flow blocks#

BlockWhat it does
WaitPauses, then carries on. For example, remove a role after 1 day. Waits survive bot restarts.
Wait for…Pauses until the member replies, clicks a button or reacts. It has a Timeout exit for when they don't. The answer is saved, for example as {var.answer}.
Random splitPicks one of 2 to 4 paths at random, by percent.
StopEnds the automation.
CodeRuns Python with the trigger's data, like an Event. Premium.

Watch out

Discord only lets the bot answer a button click for 15 minutes. In a flow started by a click, a menu or a form, use Send a message instead of Reply after a long wait.

Variables#

Any text can use variables:

VariableGives
{user.mention}, {user.name}, {user.id}The member
{server.name}The server
{channel.mention}, {channel.name}The channel
{message.content}The message text
{var.name}A value set earlier in this run
{server_var.name}, {member_var.name}Values saved on the server or member
{var.choice}, {var.choices}What was picked in a menu (first pick, or all of them)
{var.field}A form field, by the field's custom ID

Text checks ignore capital letters: "Hello" matches "hello".

Form answers#

The Fills in a form trigger gives you the form and what the member sent:

VariableGives
{form.answer.1}, {form.answer.2}, …The answer to question 1, 2, …
{form.question.1}, {form.question.2}, …The text of question 1, 2, …
{form.answers}Every answer, one per line
{form.name} or {form.title}, {form.description}The form's title and description
{form.url}, {form.code}The form's public link and its short code
{form.responses_url}The dashboard page with the form's answers
{form.source}Where it was sent: web or discord
{form.submitted_at}When it was sent, in each reader's own time
{form.answer_count}, {form.question_count}How many questions were answered, and how many the form has
{form.id}, {form.submission}The form's ID and the answer's ID

Numbers follow the form's order, counting only questions: page breaks and info text are skipped. If you move questions around in the form, their numbers change too, so check your automation after.

Pick a form in the trigger and the menu lists each question by number. With Any form, type the numbers yourself.

For a tidy post with one field per answer, add an embed with a field for each question:

Field nameField value
{form.question.1}{form.answer.1}
{form.question.2}{form.answer.2}
{form.question.3}{form.answer.3}

If a member skips a question, its answer is empty and that field is left out of the post. A number past the last question is empty too.

Role, channel and member answers show as mentions, like @Admin, @Mod. In a message's text, a role mention only pings when the message allows role pings. {form.answers} shows names instead.

They work in checks as well. For example, Compare values with {form.answer.2} equals Nord lets you send members down a different path by what they picked.

History and errors#

History lists the last runs: when, who, and how it went. A run where only the checks ran and one said no shows as Checks said no; on a busy server, one of those is kept a minute per automation, so History stays useful. Click a run to see the path it took on the canvas. A failed step shows in red with the reason, such as a missing permission.

If an action fails, the run stops there. The automation shows the last error on the Automations page until you publish again.

Limits#

StarterBasicAdvanced
Automations1550200
Longest wait30 days30 days30 days
Code blockYesYesYes

Every plan: up to 50 steps per run, and loops are not allowed (lines only go forward).

Automations that set each other off#

Messages, reactions and threads the bot makes never start an automation. Changes it makes to a member (a role, nickname, timeout or voice move) can, so two automations could keep answering each other. Two guards stop that:

  • Chain depth. A run started by another automation's change counts one step deeper. Past 3 steps it doesn't start, and History shows "Stopped: automations keep starting each other".
  • Loop breaker. If one automation is started that way for the same member more than 5 times in 10 seconds, it is turned off and the reason shows on the Automations page. Fix it, then turn it back on.

A member's own activity never counts: someone sending many messages doesn't turn anything off.

Save your own templates#

Open the ⋯ menu in the builder and pick Save as template. It appears under Templates in every server you manage.

PreviousAuto moderationNext Forms

On this page

  • Build one
  • Triggers
  • Cooldown
  • Checks (If blocks)
  • Actions
  • Flow blocks
  • Variables
  • Form answers
  • History and errors
  • Limits
  • Automations that set each other off
  • Save your own templates
Custom CommandsCustom Commands

The #1 Custom Commands Discord bot — commands, tickets, forms and levels, all from one dashboard.

Join the support server

Product

  • Overview
  • Why us?
  • Premium
  • Template shop

Community

  • Leveling
  • Global leaderboard
  • Welcome messages
  • Reaction roles
  • Social alerts
  • Voice recording

Server tools

  • AI Agent
  • Tickets
  • Forms
  • Auto moderation
  • Embed builder
  • Custom bot

Resources

  • Docs
  • Blog
  • Support
  • Dashboard
contact@ccbot.app

2 Frederick Street, London, WC1X 0ND

Payments secured by Stripe

PrivacyTerms© WEiRDSOFT LTD. All rights reserved.

Custom Commands