You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interactions/api/models/channel.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -315,7 +315,7 @@ async def modify(
315
315
:param topic?: The topic of that channel, defaults to the current value of the channel
316
316
:type topic: Optional[str]
317
317
:param bitrate?: (voice channel only) The bitrate (in bits) of the voice channel, defaults to the current value of the channel
318
-
:type bitrate Optional[int]
318
+
:type bitrate: Optional[int]
319
319
:param user_limit?: (voice channel only) Maximum amount of users in the channel, defaults to the current value of the channel
320
320
:type user_limit: Optional[int]
321
321
:param rate_limit_per_use?: Amount of seconds a user has to wait before sending another message (0-21600), defaults to the current value of the channel
@@ -725,9 +725,11 @@ async def purge(
725
725
.. warning:: Calling this method can lead to rate-limits when purging higher amounts of messages.
726
726
727
727
.. code-block:: python
728
+
728
729
def check_pinned(message):
729
730
return not message.pinned # This returns `True` only if the message is the message is not pinned
730
731
await channel.purge(100, check=check_pinned) # This will delete the newest 100 messages that are not pinned in that channel
732
+
731
733
:param amount: The amount of messages to delete
732
734
:type amount: int
733
735
:param check?: The function used to check if a message should be deleted. The message is only deleted if the check returns `True`
0 commit comments