mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Improve documentation
This commit is contained in:
1 parent
2f05436653
commit
3c9bcc2851
48 files changed
+652
-569
No files matched your search
+3
-3
@@ -54,7 +54,7 @@ class Reaction:
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
emoji: :class:`Emoji` or :class:`str`
|
||||
emoji: Union[:class:`Emoji`, :class:`str`]
|
||||
The reaction emoji. May be a custom emoji, or a unicode emoji.
|
||||
count: :class:`int`
|
||||
Number of times this reaction was made
|
||||
@@ -99,7 +99,7 @@ class Reaction:
|
||||
Remove the reaction by the provided :class:`User` from the message.
|
||||
|
||||
If the reaction is not your own (i.e. ``user`` parameter is not you) then
|
||||
the :attr:`discord.permissions.Permissions.manage_messages` permission is needed.
|
||||
the :attr:`~Permissions.manage_messages` permission is needed.
|
||||
|
||||
The ``user`` parameter must represent a user or member and meet
|
||||
the :class:`abc.Snowflake` abc.
|
||||
@@ -139,7 +139,7 @@ class Reaction:
|
||||
Flattening into a list: ::
|
||||
|
||||
users = await reaction.users().flatten()
|
||||
# users is now a list...
|
||||
# users is now a list of User...
|
||||
winner = random.choice(users)
|
||||
await channel.send('{} has won the raffle.'.format(winner))
|
||||
|
||||
|
||||
Reference in new issue
Block a user