Skip to content

Commit

Permalink
feat(player): add has_filter method (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Apr 19, 2023
1 parent a3d2596 commit bda2301
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mafic/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,23 @@ async def add_filter(

await self._update_filters(fast_apply=fast_apply)

async def has_filter(self, label: str) -> bool:
"""Check if the player has a filter with the given label.
.. versionadded:: 2.1
Parameters
----------
label:
The label to check for.
Returns
-------
:class:`bool`
Whether the player has a filter with the given label.
"""
return label in self._filters

async def remove_filter(self, label: str, *, fast_apply: bool = False) -> None:
"""Remove a filter from the player.
Expand Down

0 comments on commit bda2301

Please sign in to comment.