Skip to content

Commit

Permalink
chore: Add versionadded's
Browse files Browse the repository at this point in the history
  • Loading branch information
DA-344 committed Dec 8, 2024
1 parent 5c1e509 commit 547f976
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions discord/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def victor(self) -> bool:
""":class:`bool`: Whether the answer is the one that had the most
votes when the poll ended.
.. versionadded:: 2.5
.. note::
If the poll has not ended, this will always return ``False``.
Expand Down Expand Up @@ -487,23 +489,23 @@ def answers(self) -> List[PollAnswer]:
def victor_answer_id(self) -> Optional[int]:
"""Optional[:class:`int`]: The victor answer ID.
.. versionadded:: 2.5
.. note::
This will **always** be ``None`` for polls that have not yet finished.
.. versionadded:: 2.5
"""
return self._victor_answer_id

@property
def victor_answer(self) -> Optional[PollAnswer]:
"""Optional[:class:`PollAnswer`]: The victor answer.
.. versionadded:: 2.5
.. note::
This will **always** be ``None`` for polls that have not yet finished.
.. versionadded:: 2.5
"""
if self.victor_answer_id is None:
return None
Expand Down

0 comments on commit 547f976

Please sign in to comment.