Skip to content

Commit

Permalink
Add videoqualitymode enum
Browse files Browse the repository at this point in the history
  • Loading branch information
4Kaylum committed Apr 25, 2024
1 parent 7e7491f commit a3ea3b3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/api/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Enums
.. autoclass:: EventPrivacyLevel
.. autoclass:: EventStatus
.. autoclass:: ForumLayout
.. autoclass:: VideoQualityMode
.. autoclass:: ForumSortOrder
.. autoclass:: GatewayOpcode
.. autoclass:: InteractionResponseType
Expand Down
3 changes: 2 additions & 1 deletion novus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from .utils import types

__all__: tuple[str, ...] = (
'APIIterator',
'ActionRow',
'Activity',
'ActivityType',
Expand Down Expand Up @@ -106,7 +107,6 @@
'InteractionWebhook',
'Invite',
'LayoutComponent',
'Locale',
'MFALevel',
'MentionableSelectMenu',
'Message',
Expand Down Expand Up @@ -153,6 +153,7 @@
'UserPremiumType',
'UserSelectMenu',
'VerificationLevel',
'VideoQualityMode',
'VoiceState',
'Webhook',
'WebhookMessage',
Expand Down
1 change: 1 addition & 0 deletions novus/enums/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@
'TimestampFormat',
'UserPremiumType',
'VerificationLevel',
'VideoQualityMode',
)
6 changes: 6 additions & 0 deletions novus/enums/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'PermissionOverwriteType',
'ForumSortOrder',
'ForumLayout',
'VideoQualityMode',
)


Expand Down Expand Up @@ -54,3 +55,8 @@ class ForumLayout(Enum):
NOT_SET = 0
LIST_VIEW = 1
GALLERY_VIEW = 2


class VideoQualityMode(Enum):
AUTO = 1
FULL = 2
2 changes: 1 addition & 1 deletion novus/models/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _update(self, data: payloads.Channel) -> Self:
self.parent_id = ipid
self.last_pin_timestamp = parse_timestamp(data.get("last_pin_timestamp"))
self.rtc_region = data.get("rtc_region")
# self.video_quality_mode = data.get("video_quality_mode") # TODO make enum class
self.video_quality_mode = data.get("video_quality_mode")
self.message_count = data.get("message_count")
self.member_count = data.get("member_count")
if "thread_metadata" in data:
Expand Down

0 comments on commit a3ea3b3

Please sign in to comment.