Skip to main content

Duel Reminder

Daily duel strategy reminders for Dark War Survival. The bot sends an embed at the configured time with a template specific to the current day of the week. Before sending a new message, it deletes yesterday's.

Commands

/duel send

Manually sends today's duel reminder (for testing or first use).

ParameterTypeRequiredDescription
(none)

Permissions: Server Administrator

Example: /duel send

Success:

  1. Deletes the previous reminder message (if exists)
  2. Sends today's template to the configured channel
  3. Saves last_message_id to configuration
  4. Ephemeral confirmation "✅ Duel reminder sent!"

Errors:

  • Missing administrator permissions
  • Channel not configured
  • No template for today
  • Bot doesn't have permission to write in the channel

/duel preview

Preview of today's reminder template without sending to the channel.

ParameterTypeRequiredDescription
(none)

Permissions: Everyone — response is ephemeral

Example: /duel preview

Success: Ephemeral embed with today's template (content + embed)
Errors:

  • No template for today

Automatic Sending

The bot checks every minute if it's time to send a reminder:

  1. Iterates through all servers with the duel_reminder cog enabled
  2. Checks if now.hour == send_hour and now.minute == send_minute (in the server's timezone)
  3. Checks if it hasn't already been sent today (deduplication)
  4. If conditions are met → calls _send_daily_reminder

Send Behavior

  1. Deletes the previous message (last_message_id)
  2. Gets the template for today's day of the week
  3. Builds embed from template
  4. Sends to channel
  5. Saves new last_message_id
Anti-spam

Each day the channel has exactly one reminder message. The previous one is automatically deleted, keeping the channel clean.


Templates

Each day of the week has a separate template. The bot provides default templates in duel_templates.json, but they can be overridden in the dashboard.

Template Structure

{
"Monday": {
"content": "@everyone Today's duels!",
"embed": {
"title": "⚔️ Monday Strategy",
"description": "Today we fight...",
"color": "#E74C3C",
"image": "https://...",
"thumbnail": "https://...",
"footer": { "text": "Dark War Survival" },
"author": { "name": "Duel Master", "icon_url": "https://..." }
}
},
"Tuesday": { ... },
"Wednesday": { ... },
...
}

Template Priority

  1. Templates from cog_settings.duel_reminder.templates (dashboard) — higher priority
  2. Defaults from duel_templates.json — fallback

Configuration

OptionDescriptionDefault Value
channel_idChannel for sending remindersnone (required)
send_hourSend hour (24h)8
send_minuteSend minute0
timezone_offsetUTC offset (e.g., 2 for CEST)2
last_message_idLast sent message ID (auto)null
templatesCustom templates per daynull (use defaults)
Required Configuration

channel_id must be set in the dashboard. Without it, the cog won't send reminders (either automatically or via /duel send).

Timezone

timezone_offset: 2 means UTC+2 (Central European Summer Time). Change to 1 in winter (CET) or adjust for your server's timezone.