mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Allow creating a public thread without a starter message
This commit is contained in:
1 parent
13251da8ce
commit
dac0267e28
3 files changed
+17
-11
No files matched your search
+2
-4
@@ -867,20 +867,18 @@ class HTTPClient:
|
||||
|
||||
# Thread management
|
||||
|
||||
def start_public_thread(
|
||||
def start_thread_with_message(
|
||||
self,
|
||||
channel_id: Snowflake,
|
||||
message_id: Snowflake,
|
||||
*,
|
||||
name: str,
|
||||
auto_archive_duration: threads.ThreadArchiveDuration,
|
||||
type: threads.ThreadType,
|
||||
reason: Optional[str] = None,
|
||||
) -> Response[threads.Thread]:
|
||||
payload = {
|
||||
'name': name,
|
||||
'auto_archive_duration': auto_archive_duration,
|
||||
'type': type,
|
||||
}
|
||||
|
||||
route = Route(
|
||||
@@ -888,7 +886,7 @@ class HTTPClient:
|
||||
)
|
||||
return self.request(route, json=payload, reason=reason)
|
||||
|
||||
def start_private_thread(
|
||||
def start_thread_without_message(
|
||||
self,
|
||||
channel_id: Snowflake,
|
||||
*,
|
||||
|
||||
Reference in new issue
Block a user