This commit is contained in:
dirty-bun-ops 2026-04-24 19:24:21 -05:00 committed by GitHub
commit 4b590976fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -422,14 +422,14 @@ def _create_thread(
path = f"/channels/{channel_id}/messages/{message_id}/threads"
body: Dict[str, Any] = {
"name": name,
"auto_archive_duration": auto_archive_duration,
"auto_archive_duration": int(auto_archive_duration),
}
else:
# Create a standalone thread
path = f"/channels/{channel_id}/threads"
body = {
"name": name,
"auto_archive_duration": auto_archive_duration,
"auto_archive_duration": int(auto_archive_duration),
"type": 11, # PUBLIC_THREAD
}
thread = _discord_request("POST", path, token, body=body)
@ -669,9 +669,9 @@ def _build_schema(
"description": "Snowflake ID for forward pagination (fetch_messages).",
},
"auto_archive_duration": {
"type": "integer",
"enum": [60, 1440, 4320, 10080],
"description": "Thread archive duration in minutes (create_thread, default 1440).",
"type": "string",
"description": "Duration before the channel is automatically archived (minutes).",
"enum": ["60", "1440", "4320", "10080"],
},
}