The Reminders feature turns channel topics into cron schedules. When the bot starts (or a channel is created or updated), it reads the topic, parses any reminder definitions, and schedules recurring messages with threads.
Embed one or more reminders in a channel’s topic using the following syntax:
[reminder:CRON_EXPRESSION:MESSAGE]
You can include multiple reminders in the same topic:
Weekly standup channel. [reminder:0 9 * * 1:Weekly standup time!] [reminder:0 17 * * 5:Week in review!]
Standard 5-field cron expressions are supported (minute, hour, day-of-month, month, day-of-week). Effect’s Cron module parses the expression — invalid expressions are logged and skipped.
What happens on schedule
When a cron fires, the bot:
- Posts the reminder message to the channel.
- Creates a thread from that message named
{date} - {message} (e.g. Mon Mar 25 2026 - Weekly standup time!).
If the thread creation fails, it retries up to 3 times with a 1-second delay between attempts.
const createThreadPolicy = Schedule.spaced("1 seconds").pipe(
Schedule.both(Schedule.recurs(3)),
)
Parsing the topic
The parseTopic function uses a regular expression to extract all [reminder:...:...] blocks and parses each cron expression independently:
const parseTopic = (topic: string) =>
Effect.partition(
Array.from(topic.matchAll(/\[reminder:(.+?):(.+?)\]/g)),
(matches) => {
const [match, expression, message] = matches
if (
match === undefined ||
expression === undefined ||
message === undefined
) {
return Effect.fail(
new InvalidTopic({
reason: "invalid reminder format",
match: String(match),
}),
)
}
return parseExpression(match, expression, message)
},
)
Invalid entries are logged as info-level messages and do not prevent valid reminders in the same topic from being scheduled.
Gateway events
The bot listens to the following Discord gateway events to keep schedules in sync:
| Event | Action |
|---|
GUILD_CREATE | Schedules reminders for all channels in the guild on startup. |
CHANNEL_CREATE | Schedules reminders for the new channel. |
CHANNEL_UPDATE | Cancels existing schedules and re-parses the updated topic. |
CHANNEL_DELETE | Cancels any running schedules for the deleted channel. |
Example
To post a weekly standup reminder every Monday at 9:00 AM UTC, set the channel topic to:
[reminder:0 9 * * 1:Weekly standup time!]
At 9:00 AM every Monday the bot posts “Weekly standup time!” and opens a thread for discussion.