Skip to content

Commit

Permalink
📝 Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paillat-dev committed Nov 15, 2024
1 parent c3dfbe2 commit 38b5f3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
4 changes: 1 addition & 3 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,7 @@ async def _edit(
)
except KeyError:
pass
if options.get("flags") and not isinstance(
options["flags"], int
): # it shouldn't be an int but just in case
if options.get("flags"):
options["flags"] = options["flags"].value
try:
options["available_tags"] = [
Expand Down
23 changes: 4 additions & 19 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,8 @@ class MediaChannel(ForumChannel):
Returns the channel's name.
.. versionadded:: 2.7
Attributes
----------
name: :class:`str`
Expand Down Expand Up @@ -1413,35 +1415,25 @@ class MediaChannel(ForumChannel):
default_auto_archive_duration: :class:`int`
The default auto archive duration in minutes for threads created in this channel.
.. versionadded:: 2.0
flags: :class:`ChannelFlags`
Extra features of the channel.
.. versionadded:: 2.0
available_tags: List[:class:`ForumTag`]
The set of tags that can be used in a forum channel.
.. versionadded:: 2.3
default_sort_order: Optional[:class:`SortOrder`]
The default sort order type used to order posts in this channel.
.. versionadded:: 2.3
default_thread_slowmode_delay: Optional[:class:`int`]
The initial slowmode delay to set on newly created threads in this channel.
.. versionadded:: 2.3
default_reaction_emoji: Optional[:class:`str` | :class:`discord.GuildEmoji`]
The default forum reaction emoji.
.. versionadded:: 2.5
"""

@property
def hides_media_download_options(self):
"""Whether media download options are be hidden in this media channel.
.. versionadded:: 2.7
"""
def hides_media_download_options(self) -> bool:
"""Whether media download options are be hidden in this media channel."""
return self.flags.hide_media_download_options

@overload
Expand Down Expand Up @@ -1503,30 +1495,23 @@ async def edit(self, *, reason=None, **options):
default_thread_slowmode_delay: :class:`int`
The new default slowmode delay in seconds for threads created in this channel.
.. versionadded:: 2.3
default_sort_order: Optional[:class:`SortOrder`]
The default sort order type to use to order posts in this channel.
.. versionadded:: 2.3
default_reaction_emoji: Optional[:class:`discord.GuildEmoji` | :class:`int` | :class:`str`]
The default reaction emoji.
Can be a unicode emoji or a custom emoji in the forms:
:class:`GuildEmoji`, snowflake ID, string representation (eg. '<a:emoji_name:emoji_id>').
.. versionadded:: 2.5
available_tags: List[:class:`ForumTag`]
The set of tags that can be used in this channel. Must be less than `20`.
.. versionadded:: 2.3
require_tag: :class:`bool`
Whether a tag should be required to be specified when creating a thread in this channel.
.. versionadded:: 2.3
hide_media_download_options: :class:`bool`
Whether media download options should be hidden in this media channel.
.. versionadded:: 2.7
Returns
-------
Optional[:class:`.MediaChannel`]
Expand Down

0 comments on commit 38b5f3e

Please sign in to comment.