mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 10:20:21 +00:00
feat(discord): add autoArchiveDuration config option (#35065)
* feat(discord): add autoArchiveDuration config option
Add config option to control auto-archive duration for auto-created threads:
- autoArchiveDuration: 60 (default), 1440, 4320, or 10080
- Sets archive duration in minutes (1hr/1day/3days/1week)
- Accepts both string and numeric values
- Discord's default was 60 minutes (hardcoded)
Example config:
```yaml
channels:
discord:
guilds:
GUILD_ID:
channels:
CHANNEL_ID:
autoThread: true
autoArchiveDuration: 10080 # 1 week
```
* feat(discord): add autoArchiveDuration changelog entry (#35065) (thanks @davidguttman)
---------
Co-authored-by: Onur <onur@textcortex.com>
This commit is contained in:
@@ -384,6 +384,16 @@ export const DiscordGuildChannelSchema = z
|
||||
systemPrompt: z.string().optional(),
|
||||
includeThreadStarter: z.boolean().optional(),
|
||||
autoThread: z.boolean().optional(),
|
||||
/** Archive duration for auto-created threads in minutes. Discord supports 60, 1440 (1 day), 4320 (3 days), 10080 (1 week). Default: 60. */
|
||||
autoArchiveDuration: z
|
||||
.union([
|
||||
z.enum(["60", "1440", "4320", "10080"]),
|
||||
z.literal(60),
|
||||
z.literal(1440),
|
||||
z.literal(4320),
|
||||
z.literal(10080),
|
||||
])
|
||||
.optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user