Custom Commands homeCustom Commands
  • Blog
  • Privacy
  • Premium
  • Templates
  • Support
Back to blog
// blog

Schedule Discord Events Straight From Your Commands

Create Discord events instantly from your commands — voice channels, stage talks, or external meetups, all in one line of code.

Md Shahriyar Alam

21 days ago

·4 min read

Custom Commands can now create and manage Discord Scheduled Events for you. Announce a community night, spin up a stage talk, drop an external meetup link — then edit it, start it, end it, or cancel it, all from inside a command or event handler.

Meet the event functions: create_event, edit_event, start_event, end_event, and cancel_event.

Create an event

py
event = await create_event(
    "Community Game Night",
    "tomorrow 8pm",
    type="voice",
    channel="General",
)

That's it. The bot creates the scheduled event on your server and hands you back the event, so you can use it right away:

py
await send_message("announcements", f"New event: {event.name} — see you there!")

Every event function must be awaited — always write await ....

Three kinds of events

Pick the type that fits with type=:

External — a physical place or an off-Discord link. Needs location and end_time.

py
await create_event(
    "Downtown Meetup",
    "next saturday 3pm",
    type="external",
    location="Central Park, Main Gate",
    end_time="next saturday 6pm",
)

Voice — happens in a voice channel. Needs channel.

py
await create_event("Movie Night", "friday 9pm", type="voice", channel="Cinema")

Stage — happens in a stage channel. Needs channel.

py
await create_event(
    "AMA with the Team",
    "in 2 days",
    type="stage",
    channel="Main Stage",
    description="Bring your questions!",
)

Create options

OptionWhat it does
nameEvent title (required)
start_timeWhen it starts — a date/time string like "tomorrow 5pm", "in 3 hours", or an exact datetime (required)
type"external", "voice" or "stage" (default "external")
end_timeWhen it ends — required for external, optional for voice/stage
locationPhysical place / link — for external events
channelThe voice or stage channel — for voice/stage events
descriptionLonger details shown on the event
imageA cover image URL

What you get back

create_event returns the event object. Handy fields:

FieldWhat
event.idThe event id — pass this to edit/start/end/cancel
event.nameTitle
event.start_time / event.end_timeScheduled times
event.statusSCHEDULED, ACTIVE, COMPLETED or CANCELED
event.channel_idChannel (voice/stage)
event.locationLocation (external)
event.user_countHow many are interested

You can even build a share link:

py
await send_message(
    "announcements",
    f"📅 {event.name}\nhttps://discord.com/events/{event.guild_id}/{event.id}",
)

Edit an event

Change any field with edit_event. Pass the event (or its id) and only the things you want to change:

py
await edit_event(event, name="Game Night Deluxe", start_time="tomorrow 9pm")
await edit_event(event, description="Now with prizes!")
await edit_event(event, channel="VIP Lounge")

Start, end, or cancel

py
await start_event(event)    # mark it live now
await end_event(event)      # mark it finished
await cancel_event(event)   # remove it

start_event flips the event to active, end_event to completed, and cancel_event deletes it. Each takes the event object or its id.

Friendly times

You don't need exact timestamps — natural phrases work:

  • "tomorrow 8pm"
  • "next friday 7:30pm"
  • "in 2 hours"
  • "august 5 6pm"

Times are read in UTC. The start time must be in the future, and an end time must come after the start — otherwise the bot tells you exactly what's wrong.

When something's off

Instead of failing silently, you get a clear message:

  • "External events need a location"
  • "External events need an end_time"
  • "Channel not found with query ..."
  • "Event start_time must be in the future"
  • "Nothing to edit — pass at least one field"
  • "Missing permission to manage events in this server. Please fix permissions."

Make sure the bot has the Manage Events permission on your server.

Put it all together

Create a weekly hangout, announce it, and cancel the previous week's:

py
event = await create_event(
    "Weekly Hangout",
    "next monday 7pm",
    type="voice",
    channel="Lounge",
    description="Our usual catch-up. Everyone welcome!",
)

await send_message(
    "announcements",
    f"🗓️ **{event.name}** is scheduled! Tap *Interested* to get a reminder.\n"
    f"https://discord.com/events/{event.guild_id}/{event.id}",
)

# later, from another command that stored last week's id:
# await cancel_event(old_event_id)

Create, edit, run, and clean up your events — all from Custom Commands, in plain and simple lines.

Loading comments…

{}

Need help?

Have a question, a suggestion, or stuck on something? Reach out — we're happy to help.

Join support server
Custom CommandsCustom Commands

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

Links

HomeBlogPrivacySupport

Contact

[email protected]

2 Frederick StreetLondon, WC1X 0ND

{ / } custom commands

© WEiRDSOFT LTD. All rights reserved.