Skip to content

Commit c391c30

Browse files
committed
fix: improve clarity of NSFW parameter documentation and slowmode for continiuty
1 parent c83643f commit c391c30

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

discord/channel.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ async def edit(self, *, reason=None, **options):
812812
position: :class:`int`
813813
The new channel's position.
814814
nsfw: :class:`bool`
815-
To mark the channel as NSFW or not.
815+
Whether the channel is marked as NSFW.
816816
sync_permissions: :class:`bool`
817817
Whether to sync permissions with the channel's new or pre-existing
818818
category. Defaults to ``False``.
@@ -1115,7 +1115,7 @@ async def edit(self, *, reason=None, **options):
11151115
position: :class:`int`
11161116
The new channel's position.
11171117
nsfw: :class:`bool`
1118-
To mark the channel as NSFW or not.
1118+
Whether the channel is marked as NSFW.
11191119
sync_permissions: :class:`bool`
11201120
Whether to sync permissions with the channel's new or pre-existing
11211121
category. Defaults to ``False``.
@@ -1478,7 +1478,7 @@ async def edit(self, *, reason=None, **options):
14781478
position: :class:`int`
14791479
The new channel's position.
14801480
nsfw: :class:`bool`
1481-
To mark the channel as NSFW or not.
1481+
Whether the channel is marked as NSFW.
14821482
sync_permissions: :class:`bool`
14831483
Whether to sync permissions with the channel's new or pre-existing
14841484
category. Defaults to ``False``.
@@ -1728,7 +1728,7 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
17281728
.. versionadded:: 2.0
17291729
17301730
nsfw: :class:`bool`
1731-
To mark the channel as NSFW or not.
1731+
Whether the channel is marked as NSFW.
17321732
17331733
.. versionadded:: 2.7
17341734
"""
@@ -2102,10 +2102,10 @@ async def edit(self, *, reason=None, **options):
21022102
21032103
slowmode_delay: :class:`int`
21042104
Specifies the slowmode rate limit for user in this channel, in seconds.
2105-
The maximum value possible is `21600`.
2105+
A value of `0` disables slowmode. The maximum value possible is `21600`.
21062106
21072107
nsfw: :class:`bool`
2108-
To mark the channel as NSFW or not.
2108+
Whether the channel is marked as NSFW.
21092109
21102110
.. versionadded:: 2.7
21112111
@@ -2273,7 +2273,7 @@ class StageChannel(discord.abc.Messageable, VocalGuildChannel):
22732273
The maximum value possible is `21600`.
22742274
22752275
nsfw: :class:`bool`
2276-
To mark the channel as NSFW or not.
2276+
Whether the channel is marked as NSFW.
22772277
22782278
.. versionadded:: 2.7
22792279
"""
@@ -2768,7 +2768,7 @@ async def edit(self, *, reason=None, **options):
27682768
27692769
slowmode_delay: :class:`int`
27702770
Specifies the slowmode rate limit for user in this channel, in seconds.
2771-
The maximum value possible is `21600`.
2771+
A value of `0` disables slowmode. The maximum value possible is `21600`.
27722772
27732773
Returns
27742774
-------
@@ -2856,8 +2856,7 @@ def __init__(
28562856

28572857
def __repr__(self) -> str:
28582858
return (
2859-
"<CategoryChannel"
2860-
f" id={self.id} name={self.name!r} position={self.position}"
2859+
f"<CategoryChannel id={self.id} name={self.name!r} position={self.position}"
28612860
)
28622861

28632862
def _update(self, guild: Guild, data: CategoryChannelPayload) -> None:

discord/guild.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,9 +1168,9 @@ async def create_text_channel(
11681168
The new channel's topic.
11691169
slowmode_delay: :class:`int`
11701170
Specifies the slowmode rate limit for user in this channel, in seconds.
1171-
The maximum value possible is `21600`.
1171+
A value of `0` disables slowmode. The maximum value possible is `21600`.
11721172
nsfw: :class:`bool`
1173-
To mark the channel as NSFW or not.
1173+
Whether the channel is marked as NSFW.
11741174
reason: Optional[:class:`str`]
11751175
The reason for creating this channel. Shows up on the audit log.
11761176
@@ -1302,12 +1302,12 @@ async def create_voice_channel(
13021302
13031303
slowmode_delay: :class:`int`
13041304
Specifies the slowmode rate limit for user in this channel, in seconds.
1305-
The maximum value possible is `21600`.
1305+
A value of `0` disables slowmode. The maximum value possible is `21600`.
13061306
13071307
.. versionadded:: 2.7
13081308
13091309
nsfw: :class:`bool`
1310-
To mark the channel as NSFW or not.
1310+
Whether the channel is marked as NSFW.
13111311
13121312
.. versionadded:: 2.7
13131313
@@ -1424,12 +1424,12 @@ async def create_stage_channel(
14241424
14251425
slowmode_delay: :class:`int`
14261426
Specifies the slowmode rate limit for user in this channel, in seconds.
1427-
The maximum value possible is `21600`.
1427+
A value of `0` disables slowmode. The maximum value possible is `21600`.
14281428
14291429
.. versionadded:: 2.7
14301430
14311431
nsfw: :class:`bool`
1432-
To mark the channel as NSFW or not.
1432+
Whether the channel is marked as NSFW.
14331433
14341434
.. versionadded:: 2.7
14351435
@@ -1538,9 +1538,9 @@ async def create_forum_channel(
15381538
The new channel's topic.
15391539
slowmode_delay: :class:`int`
15401540
Specifies the slowmode rate limit for user in this channel, in seconds.
1541-
The maximum value possible is `21600`.
1541+
A value of `0` disables slowmode. The maximum value possible is `21600`.
15421542
nsfw: :class:`bool`
1543-
To mark the channel as NSFW or not.
1543+
Whether the channel is marked as NSFW.
15441544
reason: Optional[:class:`str`]
15451545
The reason for creating this channel. Shows up on the audit log.
15461546
default_reaction_emoji: Optional[:class:`GuildEmoji` | :class:`int` | :class:`str`]

0 commit comments

Comments
 (0)