ClientCompoundThreadEndpoints
Methods
()
__new__Compound components do not support instancing.
Sub-typing is supported, but the attributes are only proxied. Sub-types have no meaning by themselves.
Raises
RuntimeError
(channel)
channel_thread_get_all_activeRequests all the active threads of the given channel.
Parameter | Type | Description |
---|---|---|
channel |
| The channel to request the thread of, or it's identifier. |
Returns
thread_channels : list
of Channel
Raises
TypeError
If channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
When using API v10 or later, this endpoint filters from .guild_thread_get_all_active
method's return. Consider using that instead.
Active threads can also be extracted from Guild.threads
.
(channel)
channel_thread_get_all_archived_privateRequests all the archived private of the given channel.
Parameter | Type | Description |
---|---|---|
channel |
| The channel to request the thread of, or it's identifier. |
Returns
thread_channels : list
of Channel
Raises
TypeError
If channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel)
channel_thread_get_all_archived_publicRequests all the archived public threads of the given channel.
Parameter | Type | Description |
---|---|---|
channel |
| The channel to request the thread of, or it's identifier. |
Returns
thread_channels : list
of Channel
Raises
TypeError
If channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel)
channel_thread_get_all_self_archivedRequests all the archived private threads by the client.
Parameter | Type | Description |
---|---|---|
channel |
| The channel to request the thread of, or it's identifier. |
Returns
thread_channels : list
of Channel
Raises
TypeError
If channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel_forum, ...)
forum_thread_createCreates and thread at the given channel
with the given message fields. If there is nothing to send will return None
for channel and None
for message as well.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel_forum |
| The forum channel's identifier where the thread will be started. | |||
channel_template |
|
| (Thread) channel entity to use as a template. | ||
*positional_parameters | Positional parameters | Additional parameters to create the message with. | |||
**keyword_parameters | Keyword parameters | Additional parameters to create the message with. | |||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | |||
applied_tag_ids |
| The tags' identifier which have been applied to the thread. | |||
applied_tags |
| Alternative for | |||
attachments |
| Attachments to send. | |||
auto_archive_after |
| The default duration (in seconds) for newly created threads to automatically archive the themselves. | |||
components |
| Components attached to the message. | |||
content |
| The message's content if given. | |||
embed |
| Alternative for | |||
embeds |
| The new embedded content of the message. | |||
file |
| Alternative for | |||
files |
| Alternative for | |||
flags |
| The channel's flags. Due to name collision, | |||
invitable |
| Whether non-moderators can invite other non-moderators to the threads. | |||
name |
| The channel's name. | |||
nonce |
| Used for optimistic message sending. | |||
open_ |
| Whether the thread is open. | |||
silent |
|
| Whether the message should be delivered silently. | ||
slowmode |
| The channel's slowmode. | |||
sticker |
| Alternative for | |||
sticker_ids |
| Sticker(s) to send within the message. | |||
stickers |
| Alternative for | |||
suppress_embeds |
|
| Whether the message's embeds should be suppressed initially. | ||
tts |
|
| Whether the message is text-to-speech. |
Returns
thread_channel : None
, Channel
The created thread channel. None
if there was nothing to send.
message : None
, Message
Returns None
if there is nothing to send.
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
See Also
.message_create
: Sending a message to a text channel. .thread_create
: Create thread in a text channel.
(guild)
guild_thread_get_all_activeGets all the active threads of the given guild.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
guild |
| The guild to get it's threads of. If the guild is given as |
Returns
threads : list
of Channel
Raises
TypeError
If guild
is neither Guild
nor int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(message_or_channel, ...)
thread_createCreates a new thread derived from the given message or channel.
For private thread channels the guild needs to have level 2 boost level.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
message_or_channel | The channel or message to create thread from.
| ||||
channel_template |
|
| Channel to use as a template. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters either to define the template, or to overwrite specific fields' values. | |||
applied_tag_ids |
| The tags' identifier which have been applied to the thread. | |||
applied_tags |
| Alternative for | |||
auto_archive_after |
| The default duration (in seconds) for newly created threads to automatically archive the themselves. | |||
channel_type |
|
| The type of the created (thread) channel. | ||
flags |
| The channel's flags. | |||
invitable |
| Whether non-moderators can invite other non-moderators to the threads. | |||
name |
| The channel's name. | |||
open_ |
| Whether the thread channel is open. | |||
slowmode |
| The channel's slowmode. |
Returns
thread_channel : Channel
The created thread channel.
Raises
TypeError
If any parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel)
thread_joinJoins the client to the given thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to join to, or it's identifier. |
Raises
TypeError
If thread_channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel)
thread_leaveLeaves the client to the given thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to join to, or it's identifier. |
Raises
TypeError
If thread_channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel, user)
thread_user_addAdds the user to the thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to add the user to, or it's identifier. |
user |
| The user to add to the the thread. |
Raises
TypeError
- If
thread_channel
's type is incorrect. - If
user
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel, user)
thread_user_deleteDeletes the user to the thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to remove the user from, or it's identifier. |
user |
| The user to remove from the thread. |
Raises
TypeError
- If
thread_channel
's type is incorrect. - If
user
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel, user)
thread_user_getGets a user's thread profile inside of a thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to get the user's thread profile of. |
user |
| The user to get it's thread profile of. |
Returns
user : ClientUserBase
The user, who's thread profile was requested.
Raises
TypeError
- If
thread_channel
's type is incorrect. - If
user
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(thread_channel)
thread_user_get_allGets all the users of a thread channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
thread_channel |
| The channel to get it's users of. |
Returns
users : list
of ClientUserBase
The created users.
Raises
TypeError
If thread_channel
's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.