Skip to content

v0.3.0 — Discord notifications

Choose a tag to compare

@10thTARDIS 10thTARDIS released this 15 Mar 23:42
· 17 commits to main since this release

Bot-driven Discord notifications. Quest Board's Celery tasks now call the bot's HTTP server instead of posting plain webhook embeds on campaigns that have a guild_id configured.

Added

  • bot/cogs/notifications.py — full implementation replacing the v0.1.0 stub:
    • on_bot_notify listener routes incoming payloads to per-event handlers
    • _resolve_channel — fetches TextChannel by ID with clear logging on NotFound / Forbidden errors
    • session_proposed — rich embed with one field per time slot using Discord <t:timestamp:F> localised timestamps; slot details fetched from GET /api/bot/sessions/{id}/timeslots; seed reactions 🇦–🇪 added immediately after posting (0.5 s apart to respect rate limits)
    • session_confirmed — embed with confirmed time; campaign name fetched from API
    • session_reminder — embed with human-readable label (_reminder_label converts hours_until to "2 hours", "3 days", etc.) and confirmed time; campaign name fetched from API
    • session_cancelled — embed using title and campaign name from payload
    • vote_update — embed with per-slot yes / maybe / no counts fetched from API
    • get_message_mapping(message_id) — public method used by the voting cog (v0.5.0) to resolve a Discord message ID back to a session ID and ordered slot list
    • Redis-backed message→session store (qb_msg:{message_id}, 30-day TTL); falls back to an in-memory dict if REDIS_URL is not set or Redis is unreachable