Auto Threads watches for new messages and, when a message arrives in an eligible channel, immediately creates a dedicated thread for it. The thread title is generated by the AI — if the AI call fails, it falls back toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Effect-TS/discord-bot/llms.txt
Use this file to discover all available pages before exploring further.
{username}'s thread.
Channel eligibility
A channel is eligible when its channel topic contains the keyword[threads]. You can change the keyword with the AUTOTHREADS_KEYWORD environment variable.
AutoThreads.ts
Message handling
When an eligible message arrives, the bot:- Calls the AI (
gpt-5.2) to generate a short title from the message content. - Creates a thread from the message, capped at 100 characters and archived after 24 hours of inactivity.
- Posts a control message inside the new thread with Edit title and Archive buttons.
AutoThreads.ts
Thread controls
Edit title
Opens a modal with a text input pre-filled with the current thread name. The author of the original message or any member with Manage Channels permission can submit a new title.
Archive
Marks the thread as archived immediately. Same permission check applies.
Permission check
Both buttons check whether the member clicking them is either the original message author or holds the Manage Channels permission. Any other member receives an ephemeral error.AutoThreads.ts
Configuration
| Environment variable | Default | Description |
|---|---|---|
AUTOTHREADS_KEYWORD | [threads] | Keyword the bot looks for in a channel’s topic to enable auto-threading. |