1 GrumpyReminders EN
darksoon edited this page 2026-07-11 01:05:01 +02:00

Reminders — Personal Reminders

GrumpyReminders lets every user set their own reminders (/remind add), which the bot delivers via DM once they expire — with a fallback to the origin channel if DMs are closed.


Activation

In configs/config.yml:

addons:
  reminders: true

This module is purely database-backed — there is no configs/modules/reminders.yml. There are no configurable settings, and therefore no reload subcommand.


Commands

/remind add <in> <message>

Sets a new reminder.

Option Description
in Duration, e.g. 30m, 2h, 1d12h (see format below)
message Reminder text, max 500 characters
/remind add in:30m message:Take coffee off the stove
/remind add in:2h message:Prepare for meeting
/remind add in:1d12h message:Check server backup

Reply (ephemeral):

⏰ Reminder R-42 set — I'll ping you in 1d 12h (in 1 day).

/remind list

Shows up to 10 pending reminders of the user, sorted by due date.

/remind list

Format per line: R-<id> · relative Discord timestamp · message (truncated to 100 characters).


/remind cancel <id>

Cancels one of your own, not-yet-fired reminders by its R-# ID (enter just the number).

/remind cancel id:42

Fails if the ID doesn't exist or belongs to another user.


Duration Format

parseDuration accepts combinations of s (seconds), m (minutes), h (hours), d (days) — or a plain number (= minutes).

Input Meaning
45 45 minutes
30m 30 minutes
2h 2 hours
1d12h 1 day 12 hours
1h30m 1 hour 30 minutes
  • Maximum 1 year ahead (60 * 24 * 365 minutes) — anything above that is rejected.
  • Invalid/incomplete input (e.g. 1h garbage) is rejected.

Limits

Limit Value
Max. simultaneous pending reminders per user 25
Max. message length 500 characters
Max. lead time 1 year

When the limit is reached, an existing reminder must first be cancelled with /remind cancel.


The Runner

Every 30 seconds the bot scans the database for due reminders (remindAt <= now) and fires them.

Flow per due reminder:

  1. The reminder is atomically claimed (per-row deleteMany, not just read) — this guarantees that if two ticks overlap (e.g. a slow DM send running past the next 30s tick), only one of them delivers the reminder.
  2. The bot tries to reach the user via DM (embed with title, message, footer R-<id>).
  3. Fallback: If the DM fails (DMs closed, no shared guild anymore), the reminder is instead posted in the origin channel, pinging @User.
  4. If the channel is also unreachable, only a warning is logged — the reminder is considered consumed (deleted from the DB) and is not retried.
Tick every 30s
  └─ atomically claim due reminders
       └─ send DM to user
            ├─ success → done
            └─ failed → fallback: origin channel + @ping
                 └─ channel unreachable → log warning only

Permissions

All commands (add, list, cancel) are usable by every server user — there is no admin restriction. Only the owning user can view/cancel their own reminders. Guild-only (no DM context for the slash command itself).