diff options
| author | z03h <[email protected]> | 2021-04-17 05:10:41 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-17 08:10:41 -0400 |
| commit | 304229071f4128c91ceeff7a6727fe2c83568b98 (patch) | |
| tree | 68b3a25e562c900988a58bee69491614b6e35f30 /discord/channel.py | |
| parent | Refactor save() and read() into AssetMixin (diff) | |
| download | discord.py-304229071f4128c91ceeff7a6727fe2c83568b98.tar.xz discord.py-304229071f4128c91ceeff7a6727fe2c83568b98.zip | |
Add VoiceChannel.video_quality_mode
Diffstat (limited to 'discord/channel.py')
| -rw-r--r-- | discord/channel.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/discord/channel.py b/discord/channel.py index 57ec56ca..0ecf89e8 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -27,7 +27,7 @@ import asyncio import discord.abc from .permissions import Permissions -from .enums import ChannelType, try_enum, VoiceRegion +from .enums import ChannelType, try_enum, VoiceRegion, VideoQualityMode from .mixins import Hashable from . import utils from .asset import Asset @@ -541,7 +541,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable): __slots__ = ('name', 'id', 'guild', 'bitrate', 'user_limit', '_state', 'position', '_overwrites', 'category_id', - 'rtc_region') + 'rtc_region', 'video_quality_mode') def __init__(self, *, state, guild, data): self._state = state @@ -560,6 +560,7 @@ class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hasha self.rtc_region = data.get('rtc_region') if self.rtc_region: self.rtc_region = try_enum(VoiceRegion, self.rtc_region) + self.video_quality_mode = try_enum(VideoQualityMode, data.get('video_quality_mode', 1)) self.category_id = utils._get_as_snowflake(data, 'parent_id') self.position = data['position'] self.bitrate = data.get('bitrate') @@ -654,6 +655,10 @@ class VoiceChannel(VocalGuildChannel): A value of ``None`` indicates automatic voice region detection. .. versionadded:: 1.7 + video_quality_mode: :class:`VideoQualityMode` + The camera video quality for the voice channel's participants. + + .. versionadded:: 2.0 """ __slots__ = () @@ -665,6 +670,7 @@ class VoiceChannel(VocalGuildChannel): ('rtc_region', self.rtc_region), ('position', self.position), ('bitrate', self.bitrate), + ('video_quality_mode', self.video_quality_mode), ('user_limit', self.user_limit), ('category_id', self.category_id) ] @@ -720,6 +726,10 @@ class VoiceChannel(VocalGuildChannel): A value of ``None`` indicates automatic voice region detection. .. versionadded:: 1.7 + video_quality_mode: :class:`VideoQualityMode` + The camera video quality for the voice channel's participants. + + .. versionadded:: 2.0 Raises ------ @@ -778,6 +788,10 @@ class StageChannel(VocalGuildChannel): rtc_region: Optional[:class:`VoiceRegion`] The region for the stage channel's voice communication. A value of ``None`` indicates automatic voice region detection. + video_quality_mode: :class:`VideoQualityMode` + The camera video quality for the stage channel's participants. + + .. versionadded:: 2.0 """ __slots__ = ('topic',) @@ -789,6 +803,7 @@ class StageChannel(VocalGuildChannel): ('rtc_region', self.rtc_region), ('position', self.position), ('bitrate', self.bitrate), + ('video_quality_mode', self.video_quality_mode), ('user_limit', self.user_limit), ('category_id', self.category_id) ] @@ -845,6 +860,10 @@ class StageChannel(VocalGuildChannel): rtc_region: Optional[:class:`VoiceRegion`] The new region for the stage channel's voice communication. A value of ``None`` indicates automatic voice region detection. + video_quality_mode: :class:`VideoQualityMode` + The camera video quality for the stage channel's participants. + + .. versionadded:: 2.0 Raises ------ |