Skip to main content

Schedule Events

The Schedule Events module manages scheduled game events with a reminder system, countdown, and automatic cleanup. Ideal for Dark War Survival events such as KvK, War Rally, or other recurring activities.

Enabling the Module

  1. Dashboard → Your server → toggle Schedule Events
  2. Click Edit to create event definitions
  3. Schedule instances with commands or from the dashboard
  4. Save changes

Configuration

OptionTypeDefaultDescription
default_channel_idstring / nullnullDefault channel for reminders

Event Definitions (created in the dashboard)

Each event definition contains:

  • name — event name
  • template — embed template (title, description, color, image)
  • channel_id — reminder channel (or null → uses default)
  • reminder_offsets_minutes — list of offsets (e.g., [60, 30, 10] = 1h, 30m, 10m before)
  • is_active — whether the definition is active

Dashboard — Configuration

The Schedule Events edit panel contains:

  • Default Channel — dropdown
  • Event Definitions — CRUD list of definitions:
    • Creating a new definition (name, template, channel, offsets)
    • Editing existing ones
    • Deleting
  • Instances — view of scheduled instances (upcoming)

Filtering

The dashboard and /event list command display only future events (status = 'scheduled' AND starts_at > now). Past/completed events are not shown.

Commands

/event schedule

Schedules a new instance of a saved event.

ParameterRequiredDescription
event_nameEvent definition name (ILIKE search)
dateDate (YYYY-MM-DD)
time_strTime (HH:MM, 24h format)

Requirements: Administrator.

Example:

/event schedule event_name:KvK date:2026-06-15 time_str:20:00
Timezone

Time is interpreted as UTC+2 (CEST). The instance is saved with a timezone-aware datetime.

/event list

Displays upcoming scheduled events (max 10).

Each entry contains:

  • Event name
  • Date/time (Discord timestamp: full + relative)

/event cancel

Cancels the next instance of an event.

ParameterRequiredDescription
event_nameEvent name to cancel

Requirements: Administrator.

Changes the instance status to 'cancelled'.

Reminder System

Reminders are sent automatically based on reminder_offsets_minutes:

Example: offsets = [60, 30, 10]

  • 60 minutes before → embed "Event starts in 1 hour"
  • 30 minutes before → embed (replaces the previous one)
  • 10 minutes before → embed (replaces the previous one)
  • 0 minutes (start) → embed "🚀 Event is starting NOW!" (auto-delete after 15 min)

Automatic Cleanup

  • Each new reminder deletes the previous one (only 1 message per channel)
  • The "starting NOW" message auto-deletes after 15 minutes
  • Channel remains clean

Placeholder {countdown}

In reminder templates, you can use {countdown} — it will be replaced with a Discord relative timestamp (e.g., <t:1718474400:R> → "in 30 minutes").

Instance Statuses

StatusDescription
scheduledScheduled, waiting to start
startedStarted ("NOW!" message sent)
cancelledCancelled by admin
missedMissed (>1h past scheduled start without sending)

Auto-marking "missed"

If the bot didn't manage to process the instance (e.g., was offline) and more than 1 hour has passed since starts_at, the instance is automatically marked as 'missed' instead of sending a delayed notification.

Scheduled Task

_check_loop — every 30 seconds:

  1. Fetches all scheduled instances within the next 24 hours
  2. For each, checks if it's time for:
    • A reminder (within a 30s window from the offset trigger)
    • Start (now >= starts_at)
    • Marking as missed (>1h past start)

Database

TableDescription
schedule_eventsEvent definitions (name, template, channel_id, reminder_offsets, is_active)
schedule_instancesScheduled instances (event_id, guild_id, starts_at, status, last_reminder_message_id)

Logging

The Schedule Events module does not have a dedicated log category. Actions are tracked through instance statuses in the database.

Tips

Best practices
  • Create definitions for recurring events (KvK, Rally, etc.)
  • Set 2-3 reminder offsets (e.g., 60, 30, 10 minutes before)
  • Use {countdown} in the template description — Discord will display a dynamic countdown
  • A dedicated channel (e.g., #events) will stay organized thanks to auto-cleanup
Recurring events

For weekly recurring events, schedule several instances in advance. The dashboard allows quickly adding instances.

warning

Event definitions are created in the dashboard. The /event schedule command is only for scheduling instances of existing definitions.