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

Guides

View .md

Reminders

Make a /remind command that DMs a member later, or pings them in the channel.

You will make /remind. A member runs it with a time and a note. Later, the bot sends them the note.

text
/remind when: 2 hours note: Take the pizza out

The bot uses schedule. It saves an action now and runs it later. The bot keeps the action safe through restarts.

1. Create the command#

Open Create → Slash Command and switch to Advanced at the top of the form.

FieldValue
Command Nameremind
DescriptionRemind me about something

Under Behavior, turn on Only the user sees the reply.

2. Add the arguments#

TypeNameRequiredDescription
TextwhenYesFor example 10 minutes, 2 hours, 3 days
TextnoteYesWhat to remind you about

3. Add the code#

Open Pre-hook and paste:

python
await schedule("send_dm", f"in {when}", data=f"⏰ Reminder: {note}")
set_content(f"Got it! I will DM you {timestamp(f'in {when}', 'R')}.")
PartJob
"send_dm"The action to run later: a DM.
f"in {when}"When to run it, for example in 2 hours.
data=...The text of the DM.
timestamp(..., 'R')Shows "in 2 hours" in the reply. It counts down on its own in Discord.

The DM goes to the member who ran the command. You do not need to say who.

Note

Write the time as a length: 10 minutes, 2 hours, 3 days. If the bot cannot read the time, the member sees "Schedule time must be in the future" and nothing is saved.

4. Try it#

Save, then run:

text
/remind when: 1 minute note: It works!

Wait one minute and check your DMs.

Ping in the channel instead#

Some members turn DMs off. Then a DM reminder fails without a word. To ping them in the channel instead, use send_message:

python
await schedule(
    "send_message",
    f"in {when}",
    data=f"⏰ {user.mention}, reminder: {note}",
)
set_content(f"Got it! I will ping you here {timestamp(f'in {when}', 'R')}.")

The message goes to the channel where the command ran.

Limits#

schedule works on every plan. Each server can have a number of actions waiting at once:

PlanWaiting actions
Free20
Starter100
Basic250
Advanced1,000

An action stops counting once it has run. When the server is full, /remind shows an error until older reminders go off.

Tip

schedule returns an ID. Save it if you want a /cancel-reminder command later. await cancel_schedule(id) deletes a waiting action, and await list_schedules() lists all of them for the server.

Learn more#

  • Scheduling lists every action schedule can run, like add_role and delete_message.
  • Time covers timestamp and the other time tools.
  • The /remind example is a ready-to-copy version.
PreviousButton gameNext Buttons and menus

On this page

  • 1. Create the command
  • 2. Add the arguments
  • 3. Add the code
  • 4. Try it
  • Ping in the channel instead
  • Limits
  • Learn more
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