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

/8ball

Ask the magic 8-ball a question and get a random answer.

Ask a yes-or-no question. The bot picks a random answer.

text
/8ball question: Will I win the giveaway?

🎱 Will I win the giveaway? Signs point to yes.

Setup#

Create a slash command and switch to Advanced.

FieldValue
Command Name8ball
DescriptionAsk the magic 8-ball

Arguments:

TypeNameRequired
TextquestionYes

Code#

Pre-hook:

python
answer = random([
    "It is certain.",
    "Without a doubt.",
    "Yes, definitely.",
    "Signs point to yes.",
    "Ask again later.",
    "Cannot predict now.",
    "Don't count on it.",
    "My sources say no.",
    "Very doubtful.",
])

Content / Reply Message:

text
🎱 **{question}**
{answer}

random picks one item from the list. The reply shows it with {answer}, and the question with {question}.

Make it yours#

Add or remove answers in the list. Each answer is text in quotes, followed by a comma.

Related#

  • Variables explains { } in the reply.
  • /coinflip is another random pick.
PreviousEvent variablesNext /coinflip

On this page

  • Setup
  • Code
  • Make it yours
  • 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