Skip to content

Commit 7257401

Browse files
committed
Address change requests and unify warnings to be notes
1 parent ca98dd2 commit 7257401

2 files changed

Lines changed: 27 additions & 9 deletions

File tree

discord/channel.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,10 @@ async def edit(self, *, reason=None, **options):
12261226
position: :class:`int`
12271227
The new channel's position.
12281228
nsfw: :class:`bool`
1229-
Whether the channel is marked as NSFW.
1229+
Whether the channel is marked as NSFW. Mutually exclusive with :attr:`spoiler`.
1230+
1231+
.. note::
1232+
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
12301233
sync_permissions: :class:`bool`
12311234
Whether to sync permissions with the channel's new or pre-existing
12321235
category. Defaults to ``False``.
@@ -1271,6 +1274,9 @@ async def edit(self, *, reason=None, **options):
12711274
12721275
.. versionadded:: 2.9
12731276
1277+
.. note::
1278+
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
1279+
12741280
Returns
12751281
-------
12761282
Optional[:class:`.ForumChannel`]
@@ -1644,7 +1650,10 @@ async def edit(self, *, reason=None, **options):
16441650
position: :class:`int`
16451651
The new channel's position.
16461652
nsfw: :class:`bool`
1647-
Whether the channel is marked as NSFW.
1653+
Whether the channel is marked as NSFW. Mutually exclusive with :attr:`spoiler`.
1654+
1655+
.. note::
1656+
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
16481657
sync_permissions: :class:`bool`
16491658
Whether to sync permissions with the channel's new or pre-existing
16501659
category. Defaults to ``False``.
@@ -1686,6 +1695,9 @@ async def edit(self, *, reason=None, **options):
16861695
16871696
.. versionadded:: 2.9
16881697
1698+
.. note::
1699+
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
1700+
16891701
Returns
16901702
-------
16911703
Optional[:class:`.MediaChannel`]
@@ -2312,15 +2324,21 @@ async def edit(self, *, reason=None, **options):
23122324
A value of `0` disables slowmode. The maximum value possible is `21600`.
23132325
23142326
nsfw: :class:`bool`
2315-
Whether the channel is marked as NSFW.
2327+
Whether the channel is marked as NSFW. Mutually exclusive with :attr:`spoiler`.
23162328
23172329
.. versionadded:: 2.7
23182330
2331+
.. note::
2332+
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
2333+
23192334
spoiler: :class:`bool`
23202335
Whether the channel should be a spoiler channel. Mutually exclusive with :attr:`nsfw`.
23212336
23222337
.. versionadded:: 2.9
23232338
2339+
.. note::
2340+
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
2341+
23242342
Returns
23252343
-------
23262344
Optional[:class:`.VoiceChannel`]

discord/guild.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ async def create_text_channel(
15531553
nsfw: :class:`bool`
15541554
Whether the channel is marked as NSFW.
15551555
1556-
.. warning::
1556+
.. note::
15571557
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
15581558
15591559
reason: Optional[:class:`str`]
@@ -1573,7 +1573,7 @@ async def create_text_channel(
15731573
15741574
.. versionadded:: 2.9
15751575
1576-
.. warning::
1576+
.. note::
15771577
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
15781578
15791579
Returns
@@ -1930,15 +1930,15 @@ async def create_stage_channel(
19301930
19311931
.. versionadded:: 2.7
19321932
1933-
.. warning::
1933+
.. note::
19341934
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
19351935
19361936
spoiler: :class:`bool`
19371937
Whether the channel is marked as a spoiler channel.
19381938
19391939
.. versionadded:: 2.9
19401940
1941-
.. warning::
1941+
.. note::
19421942
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
19431943
19441944
Returns
@@ -2100,7 +2100,7 @@ async def create_forum_channel(
21002100
nsfw: :class:`bool`
21012101
Whether the channel is marked as NSFW.
21022102
2103-
.. warning::
2103+
.. note::
21042104
Passing both this and ``spoiler`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
21052105
21062106
reason: Optional[:class:`str`]
@@ -2136,7 +2136,7 @@ async def create_forum_channel(
21362136
21372137
.. versionadded:: 2.9
21382138
2139-
.. warning::
2139+
.. note::
21402140
Passing both this and ``nsfw`` as ``True`` will mark the channel as NSFW and ignore the spoiler flag.
21412141
21422142
Returns

0 commit comments

Comments
 (0)