
What it is
Scheduled events are the events members see in your server's Events tab. Your bot can now run them for you: five new blocks under Scheduled Event Actions create and manage them from any command or event, and three new events let your bot react when one starts, ends or is cancelled.
The five blocks
- Create a Scheduled Event: set the name, description, place, start and end time, repeat and cover image.
- Edit a Scheduled Event: change any detail. Fields left blank keep their current value.
- Start, End or Cancel a Scheduled Event: start it now, end it now or cancel it. Cancelling marks the event as cancelled instead of deleting it.
- Delete a Scheduled Event: remove it from the server completely.
- Get a Scheduled Event: find an event by ID, by name, or pick the next upcoming (or currently active) one, and use its details in later blocks.
Create an event
- Add Create a Scheduled Event to a command or event.
- Fill in the Event Name and pick an Event Type: a voice channel, a stage channel or an external event somewhere else.
- Set the Start Date and Time with the date and time picker and a timezone, or choose Use a variable, timestamp or duration to use something like
2hor a command option. - Pick a Repeat, such as every week on the start day, and add a Cover Image link if you like.
- Save. The event appears in the server's Events tab each time the block runs.
Use the result
Every block gives you a result variable, called scheduled_event unless you change its Result Variable Name. Reply with {scheduled_event.url} to link members straight to the event, and pass {scheduled_event.id} to the edit, status and delete blocks later on.
On the create and get blocks, turn on Create an invite link to also get an invite that opens onto the event. The get block can also return who is interested with Include interested users.
Three new events
The three new events are When a scheduled event starts, When a scheduled event ends and When a scheduled event is cancelled. Pick one when you create an event and use variables like {event_name} and {event_url} in its blocks.
{event_name} and {event_url} in your announcements channelGood to know
- Your bot needs the Manage Events permission to edit, start, end, cancel or delete events. To create them, Create Events is enough.
- Deleting an event that has not finished yet also counts as cancelling it, so When a scheduled event is cancelled runs then too.
- Start times must be in the future. External events need a Location and an end time.
- Only scheduled events can be started, only active events can be ended, and only events that have not started can be cancelled.
- If a block fails,
{scheduled_event.success}is false and{scheduled_event.error}says why.
Full list of changes
- NewCreate a Scheduled Event block with a date and time picker, timezones, repeats and a cover image
- NewEdit a Scheduled Event, Start, End or Cancel a Scheduled Event and Delete a Scheduled Event blocks
- NewGet a Scheduled Event block: find one by ID, by name, or the next upcoming one, with who is interested
- NewWhen a scheduled event starts, ends and is cancelled events, with
{event_name}and{event_url} - New
{scheduled_event.url}and{scheduled_event.id}result variables, plus an optional invite link that opens onto the event