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

Examples

View .md

/coinflip

Flip a coin. Heads or tails.

The bot flips a coin and shows the side.

🪙 @Alex flipped a coin: Heads!

Setup#

Create a slash command and switch to Advanced.

FieldValue
Command Namecoinflip
DescriptionFlip a coin

No arguments.

Code#

Pre-hook:

python
side = random(["Heads", "Tails"])

Content / Reply Message:

text
🪙 {user.mention} flipped a coin: **{side}**!

Make it a bet#

Add a Text argument named guess, with two Choices: Heads and Tails. Then change the pre-hook:

python
side = random(["Heads", "Tails"])
result = "You guessed right!" if side == guess else "Better luck next time."

And the reply:

text
🪙 It landed on **{side}**. {result}

Related#

  • /8ball picks from a longer list.
  • Economy lets members bet coins.
Previous/8ballNext /avatar

On this page

  • Setup
  • Code
  • Make it a bet
  • Related
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