Skip to content

Commit

Permalink
More docs on Queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Feb 4, 2024
1 parent 70c8009 commit 85c1aaf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions wavelink/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def count(self) -> int:
-------
int
The amount of tracks in the queue.
.. versionadded:: 3.2.0
"""

return len(self)
Expand All @@ -146,6 +149,9 @@ def is_empty(self) -> bool:
-------
bool
Whether the queue is empty.
.. versionadded:: 3.2.0
"""

return not bool(self)
Expand Down Expand Up @@ -288,6 +294,9 @@ def get_at(self, index: int, /) -> Playable:
The queue was empty when retrieving a track.
IndexError
The index was out of range for the current queue.
.. versionadded:: 3.2.0
"""

if not self:
Expand Down Expand Up @@ -316,6 +325,9 @@ def put_at(self, index: int, value: Playable, /) -> None:
------
TypeError
The track was not a :class:`wavelink.Playable`.
.. versionadded:: 3.2.0
"""
self._check_compatibility(value)
self._items.insert(index, value)
Expand Down Expand Up @@ -468,6 +480,11 @@ def delete(self, index: int, /) -> None:
# Deletes the track at index 1 (The second track).
queue.delete(1)
.. versionchanged:: 3.2.0
The method is no longer a coroutine.
"""

del self._items[index]
Expand Down

0 comments on commit 85c1aaf

Please sign in to comment.