Skip to content

Commit 6b274da

Browse files
committed
📝 Requested changes
1 parent bb8bc7b commit 6b274da

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

discord/abc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,7 @@ async def _edit(
416416
)
417417
except KeyError:
418418
pass
419-
if options.get("flags") and not isinstance(
420-
options["flags"], int
421-
): # it shouldn't be an int but just in case
419+
if options.get("flags"):
422420
options["flags"] = options["flags"].value
423421
try:
424422
options["available_tags"] = [

discord/channel.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,8 @@ class MediaChannel(ForumChannel):
13771377
13781378
Returns the channel's name.
13791379
1380+
.. versionadded:: 2.7
1381+
13801382
Attributes
13811383
----------
13821384
name: :class:`str`
@@ -1413,35 +1415,25 @@ class MediaChannel(ForumChannel):
14131415
default_auto_archive_duration: :class:`int`
14141416
The default auto archive duration in minutes for threads created in this channel.
14151417
1416-
.. versionadded:: 2.0
14171418
flags: :class:`ChannelFlags`
14181419
Extra features of the channel.
14191420
1420-
.. versionadded:: 2.0
14211421
available_tags: List[:class:`ForumTag`]
14221422
The set of tags that can be used in a forum channel.
14231423
1424-
.. versionadded:: 2.3
14251424
default_sort_order: Optional[:class:`SortOrder`]
14261425
The default sort order type used to order posts in this channel.
14271426
1428-
.. versionadded:: 2.3
14291427
default_thread_slowmode_delay: Optional[:class:`int`]
14301428
The initial slowmode delay to set on newly created threads in this channel.
14311429
1432-
.. versionadded:: 2.3
14331430
default_reaction_emoji: Optional[:class:`str` | :class:`discord.GuildEmoji`]
14341431
The default forum reaction emoji.
1435-
1436-
.. versionadded:: 2.5
14371432
"""
14381433

14391434
@property
1440-
def hides_media_download_options(self):
1441-
"""Whether media download options are be hidden in this media channel.
1442-
1443-
.. versionadded:: 2.7
1444-
"""
1435+
def hides_media_download_options(self) -> bool:
1436+
"""Whether media download options are be hidden in this media channel."""
14451437
return self.flags.hide_media_download_options
14461438

14471439
@overload
@@ -1503,30 +1495,23 @@ async def edit(self, *, reason=None, **options):
15031495
default_thread_slowmode_delay: :class:`int`
15041496
The new default slowmode delay in seconds for threads created in this channel.
15051497
1506-
.. versionadded:: 2.3
15071498
default_sort_order: Optional[:class:`SortOrder`]
15081499
The default sort order type to use to order posts in this channel.
15091500
1510-
.. versionadded:: 2.3
15111501
default_reaction_emoji: Optional[:class:`discord.GuildEmoji` | :class:`int` | :class:`str`]
15121502
The default reaction emoji.
15131503
Can be a unicode emoji or a custom emoji in the forms:
15141504
:class:`GuildEmoji`, snowflake ID, string representation (eg. '<a:emoji_name:emoji_id>').
15151505
1516-
.. versionadded:: 2.5
15171506
available_tags: List[:class:`ForumTag`]
15181507
The set of tags that can be used in this channel. Must be less than `20`.
15191508
1520-
.. versionadded:: 2.3
15211509
require_tag: :class:`bool`
15221510
Whether a tag should be required to be specified when creating a thread in this channel.
15231511
1524-
.. versionadded:: 2.3
15251512
hide_media_download_options: :class:`bool`
15261513
Whether media download options should be hidden in this media channel.
15271514
1528-
.. versionadded:: 2.7
1529-
15301515
Returns
15311516
-------
15321517
Optional[:class:`.MediaChannel`]

0 commit comments

Comments
 (0)