ClientCompoundChannelEndpoints
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
(guild, ...)
channel_createCreates a new channel at the given guild
. If the channel is successfully created returns it.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
guild |
| The guild where the channel will be created. | |||
channel_template |
|
| Channel entity to use as a template. | ||
reason |
|
| Shows up at the | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters to create the channel with. | |||
bitrate |
| The bitrate (in bits) of the voice channel. | |||
default_forum_layout |
| The default layout used to display threads of the forum. | |||
default_sort_order |
| The default thread ordering of the forum. | |||
default_thread_auto_archive_after |
| The default duration (in seconds) for newly created threads to automatically archive the themselves. | |||
default_thread_reaction_emoji |
| The emoji to show in the add reaction button on a thread of the forum channel. | |||
default_thread_slowmode |
| The default slowmode applied to the channel's threads. | |||
channel_type |
| The type of the created channel. | |||
flags |
| The channel's flags. | |||
name |
| The channel's name. | |||
nsfw |
| Whether the channel is marked as non safe for work. | |||
parent_id |
| The channel's parent's identifier. | |||
permission_overwrites |
| The channel's permission overwrites. | |||
position |
| The channel's position. | |||
region |
| The channel's voice region. | |||
slowmode |
| The channel's slowmode. | |||
topic |
| The channel's topic. | |||
users |
| The users in the channel. | |||
video_quality_mode | The video quality of the voice channel. |
Returns
channel : Channel
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, ...)
channel_deleteDeletes the specified guild channel.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel to delete. | |||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
TypeError
If the given channel
is not Channel
, int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
If a category channel is deleted, it's sub-channels will not be removed, instead they will move under the guild.
(channel, ...)
channel_editEdits the given guild channel. Different channel types accept different fields, so make sure to not pass out of place parameters. Only the given fields will be modified of the channel.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel to edit. | |||
channel_template |
|
| A channel to use as a template. | ||
reason |
|
| Shows up at the respective guild's audit logs. | ||
**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. Applicable for threads of a forum. | |||
auto_archive_after |
| The default duration (in seconds) for newly created threads to automatically archive the themselves. | |||
bitrate |
| The bitrate (in bits) of the voice channel. | |||
default_forum_layout |
| The default layout used to display threads of the forum. | |||
default_sort_order |
| The default thread ordering of the forum. | |||
default_thread_auto_archive_after |
| The default duration (in seconds) for newly created threads to automatically archive the themselves. | |||
default_thread_reaction_emoji |
| The emoji to show in the add reaction button on a thread of the forum channel. | |||
default_thread_slowmode |
| The default slowmode applied to the channel's threads. | |||
flags |
| The channel's flags. | |||
name |
| The channel's name. | |||
nsfw |
| Whether the channel is marked as non safe for work. | |||
open_ |
| Whether the thread channel is open. | |||
parent_id |
| The channel's parent's identifier. | |||
permission_overwrites |
| The channel's permission overwrites. | |||
position |
| The channel's position. | |||
region |
| The channel's voice region. | |||
slowmode |
| The channel's slowmode. | |||
topic |
| The channel's topic. | |||
users |
| The users in the channel. | |||
video_quality_mode | The video quality of the voice channel. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, status, ...)
channel_edit_statusEdits the channel with the given status. Channel should be a guild voice.
this function is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel to edit. | |||
status |
| The channel's status. | |||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
TypeError
- If any parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(source_channel, target_channel, ...)
channel_followFollows the source_channel
with the target_channel
. Returns the webhook, what will crosspost the published messages.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
source_channel |
| The channel what will be followed. Must be an announcements channel. | |||
target_channel |
| The target channel where the webhook messages will be sent. Can be any guild text channel type. | |||
reason |
|
| Shows up at the respective guild's audit logs. |
Returns
webhook : Webhook
The webhook what will crosspost the published messages. This webhook has no .token
set.
Raises
TypeError
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(...)
channel_group_createCreates a group channel with the given users.
This method is a coroutine.
Parameter | Type | Optional | Description |
---|---|---|---|
*users |
| The users to create the channel with. |
Returns
channel : Channel
The created group channel.
Raises
TypeError
If users
contain not only User, Client
, int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
This endpoint does not support bot accounts.
(channel, ...)
channel_group_editEdits the given group channel. Only the provided parameters will be edited.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel to edit. | |||
channel_template |
|
| A channel to use as a template. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters to define which fields should be modified. | |||
icon |
| The new icon of the channel. By passing | |||
name |
| The new name of the channel. By passing |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
No request is done if no optional parameter is provided.
(channel)
channel_group_leaveLeaves the client from the specified group channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
channel |
| The channel to leave from. |
Raises
TypeError
If channel
was not given neither as Channel
nor int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, ...)
channel_group_user_addAdds the users to the given group channel.
This method is a coroutine.
Parameter | Type | Optional | Description |
---|---|---|---|
channel |
| The channel to add the | |
*users |
| The users to add to the |
Raises
TypeError
- If
channel
was not given neither asChannel
norint
. - If
users
contains nonClientUserBase
, neitherint
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, ...)
channel_group_user_deleteRemoves the users from the given group channel.
This method is a coroutine.
Parameter | Type | Optional | Description |
---|---|---|---|
channel |
| The channel from where the | |
*users |
| The users to remove from the |
Raises
TypeError
- If
channel
was not given neither asChannel
norint
. - If
users
contains nonClientUserBase
, neitherint
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, visual_position, ...)
channel_moveMoves a guild channel to the given visual position under it's parent, or guild. If the algorithm can not place the channel exactly on that location, it will place it as close, as it can. If there is nothing to move, then the request is skipped.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel | The channel to be moved. | ||||
visual_position |
| The visual position where the channel should go. | |||
parent |
| If not set, then the channel will keep it's current parent. If the parameter is set | |||
lock_permissions |
|
| If you want to sync the permissions with the new category set it to | ||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
ValueError
- If the
channel
would be between guilds. - If parent channel would be moved under an other category.
TypeError
- If
channel
was isn ot movable. - If
parent
was not given asNone
,Channel
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
This method also fixes the messy channel positions of Discord to an intuitive one.
(user)
channel_private_createCreates a private channel with the given user. If there is an already cached private channel with the user, returns that.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
user |
| The user to create the private with. |
Returns
channel : Channel
The created private channel.
Raises
TypeError
If user
was not given neither as ClientUserBase
nor int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
()
channel_private_get_allRequest the client's private + group channels and returns them in a list. At the case of bot accounts the request returns an empty list, so we skip it.
This method is a coroutine.
Returns
channels : list
of (Channel
, Channel
) objects
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(forum_channel, ...)
forum_tag_createCreates a new forum tag in the channel.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
forum_channel |
| The channel to create the tag in. | |||
forum_tag |
|
| A forum tag which can be used as a template for the newly created tag. | ||
reason |
|
| Shows up at the respective guild's audit logs. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters either to define the template, or to overwrite specific fields' values. | |||
emoji |
| The tag's emoji. | |||
moderated |
| Whether this tag can only be added or removed by a user with | |||
name |
| The tag's name. |
Returns
forum_tag : None
, ForumTag
The created forum tag.
Raises
TypeError
If a parameter's type is not acceptable.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
A forum channel can have up to 25 tags.
See Also
.forum_tag_delete
: Delete a forum tag..forum_tag_edit
: Modify a forum tag.
(forum_channel, forum_tag, ...)
forum_tag_deleteDeletes the given forum tag.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
forum_channel |
| The channel to edit the tag in. | |||
forum_tag |
| The forum tag to delete. | |||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
TypeError
If a parameter's type is not acceptable.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
See Also
.forum_tag_create
: Create a forum tag..forum_tag_edit
: Modify a forum tag.
(forum_channel, forum_tag, ...)
forum_tag_editEdits the given forum tag.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
forum_channel |
| The channel to edit the tag in. | |||
forum_tag |
| The forum tag to edit. | |||
template_forum_tag |
|
| A forum tag which can be used as a template for edition. | ||
reason |
|
| Shows up at the respective guild's audit logs. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters either to define the template, or to overwrite specific fields' values. | |||
emoji |
| The tag's emoji. | |||
moderated |
| Whether this tag can only be added or removed by a user with | |||
name |
| The tag's name. |
Raises
TypeError
If a parameter's type is not acceptable.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
See Also
.forum_tag_create
: Create a forum tag..forum_tag_delete
: Delete a forum tag.
(guild)
guild_channel_get_allRequests the given guild's channels and if there any de-sync between the wrapper and Discord, applies the changes.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
guild |
| The guild, what's channels will be requested. |
Returns
channels : list
of Channel
Raises
TypeError
If guild
was not given neither as Guild
, nor as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, ...)
permission_overwrite_createCreates a permission overwrite at the given channel.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel to what the permission overwrite will be added. | |||
permission_overwrite_template |
|
| Permission overwrite to be used as a template for creating the new one. | ||
reason |
|
| Shows up at the respective guild's audit logs. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters either to define the template, or to overwrite specific fields' values. | |||
allow |
| The permission overwrite's allowed permission's value. | |||
deny |
| The permission overwrite's denied permission's value. | |||
target |
| The permission overwrite's target. Shortcut for defining | |||
target_id |
| The permission overwrite's target's identifier. | |||
target_type | The permission overwrite's target's type. Required if |
Returns
permission_overwrite : PermissionOverwrite
A permission overwrite, what estimatedly is same as the one what Discord will create.
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, permission_overwrite, ...)
permission_overwrite_deleteDeletes the given permission overwrite.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel | ˙˙Channel | The channel where the permission overwrite is. | |||
permission_overwrite |
| The permission overwrite to delete. | |||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, permission_overwrite, ...)
permission_overwrite_editEdits the given permission overwrite.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel | ˙˙Channel, int | The channel where the permission overwrite is. | |||
permission_overwrite | The permission overwrite to edit. | ||||
reason |
|
| Shows up at the respective guild's audit logs. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters either to define the template, or to overwrite specific fields' values. | |||
allow |
| The permission overwrite's allowed permission's value. | |||
deny |
| The permission overwrite's denied permission's value. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.