A simple Pascal-based bot that automatically creates a Discord thread at a scheduled time each week and posts an initial message into it. This is ideal for recurring status updates, weekly meetings, or automated check-ins.
The application is configured using environment variables. You can use the provided env-example as a template.
| Variable | Description | Example |
|---|---|---|
RUN_AT |
The schedule in DOW:HH:MM format (1=Sun, 7=Sat). |
3:09:00 (Tuesday at 09:00) |
DISCORD_BOT_TOKEN |
Your Discord Bot's authentication token. | MTIzNDU2... |
DISCORD_CHANNEL_ID |
The ID of the channel where the thread will be created. | 123456789012345678 |
THREAD_NAME |
The base name for the thread. The current date is appended automatically. | Weekly Status |
THREAD_MESSAGE |
The first message to post in the thread. Supports Discord mentions. | @here Please post updates! |
ARCHIVE_DURATION |
(Optional) Minutes until the thread is archived. Defaults to 10080 (7 days). | 1440 (1 day) |
RUN_AT)The RUN_AT variable follows the format DayOfWeek:Hour:Minute:
Example: RUN_AT=2:14:30 triggers every Monday at 14:30.
RUN_AT schedule and validates the environment variables.RUN_AT setting, the "Core" logic is executed.THREAD_NAME (YYYY-MM-DD).THREAD_MESSAGE inside the new thread.Send Messages and Create Public Threads permissions in the target channel.