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
  • Social alerts
  • Moderation commands
  • Levels and XP
  • Economy and coins
  • Ticket system
  • 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
  • Scheduling
  • Server events and polls
  • Time
  • Waiting
  • Utilities
  • Objects
  • Event variables

Examples

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

Getting started

View .md

Text commands

Commands that run when someone types a prefix and a name in chat, like ..rules.

A text command runs when someone types a message that starts with your prefix and the command name.

text
..rules

The default prefix is .. (two dots). Change it on the Settings page under Command prefix. It can be 1 to 10 characters.

Slash or text?#

Slash commandText command
How to runType / and pick it from the menuType the prefix and the name
Shows in Discord's command menuYesNo
ArgumentsDiscord shows a box for each oneTyped after the name, split by spaces
Reply only the user can seeYesNo
Buttons, embeds, codeYesYes

Pick slash for most commands. People can find them in the menu, and Discord checks the arguments for you.

Pick text for quick shortcuts, or when you want commands that do not show in the menu.

Make one#

  1. Open Create → Text Command.
  2. Set Command Name, for example rules.
  3. Write the reply in Response.
  4. Press Save.

Text commands do not need a sync. They work as soon as you save.

Arguments#

Arguments are typed after the name, split by spaces:

text
..give @Alex 50

With two arguments, a Member named target and an Integer named amount, the bot reads @Alex as target and 50 as amount.

Rules for typing arguments:

  • Spaces split arguments. Wrap text in double quotes to keep spaces: ..say "hello there".
  • The last argument takes the rest. If there are more words than arguments, the extra words go into the last one. Good for a reason or a message.
  • Members, roles and channels are typed as mentions: @Alex, @Mods, #general.
  • Boolean arguments accept yes, true or 1 as true.

Each argument is a variable with its name, the same as in slash commands:

text
{user.mention} gave {amount} coins to {target.mention}.

In code#

Text commands have a message variable. It is the message that ran the command. There is no interaction.

python
add_reactions(message, "✅")

Everything else works the same as a slash command: pre-hook, Response, post-hook, buttons and embeds. See How a command runs.

Note

The command name must match exactly. ..Rules does not run rules.

PreviousVariables in repliesNext Events

On this page

  • Slash or text?
  • Make one
  • Arguments
  • In code
Custom CommandsCustom Commands

The #1 Custom Commands Discord bot — build commands, events and databases with zero boilerplate.

Join the support server

Product

  • Overview
  • Why us?
  • Premium
  • Template shop

Features

  • AI Agent
  • Reaction roles
  • Welcome messages
  • Embed builder
  • Social alerts
  • Custom bot

Resources

  • Docs
  • Blog
  • Support
  • Dashboard

Company

  • Privacy
  • Terms
  • Contact
contact@ccbot.app

2 Frederick Street, London, WC1X 0ND

Payments secured by Stripe

© WEiRDSOFT LTD. All rights reserved.

Custom Commands