mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Update Polls event docs
This commit is contained in:
parent
d18f14c173
commit
205ddaff66
@ -446,7 +446,12 @@ class Poll:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def created_at(self) -> Optional[datetime.datetime]:
|
def created_at(self) -> Optional[datetime.datetime]:
|
||||||
""":class:`datetime.datetime`: Returns the poll's creation time, or ``None`` if user-created."""
|
"""Optional[:class:`datetime.datetime`]: Returns the poll's creation time.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This will **always** be ``None`` for stateless polls.
|
||||||
|
"""
|
||||||
|
|
||||||
if not self._message:
|
if not self._message:
|
||||||
return
|
return
|
||||||
|
@ -1053,8 +1053,8 @@ Polls
|
|||||||
.. function:: on_poll_vote_add(user, answer)
|
.. function:: on_poll_vote_add(user, answer)
|
||||||
on_poll_vote_remove(user, answer)
|
on_poll_vote_remove(user, answer)
|
||||||
|
|
||||||
Called when a :class:`Poll` gains or loses a vote. If the ``user`` or ``message``
|
Called when a :class:`Poll` gains or loses a vote. If the ``user`` or ``answer``'s poll
|
||||||
are not cached then this event will not be called.
|
parent message are not cached then this event will not be called.
|
||||||
|
|
||||||
This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.
|
This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.
|
||||||
|
|
||||||
@ -1078,6 +1078,11 @@ Polls
|
|||||||
|
|
||||||
This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.
|
This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
If the poll allows multiple answers and the user removes or adds multiple votes, this
|
||||||
|
event will be called as many times as votes that are added or removed.
|
||||||
|
|
||||||
.. versionadded:: 2.4
|
.. versionadded:: 2.4
|
||||||
|
|
||||||
:param payload: The raw event payload data.
|
:param payload: The raw event payload data.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user