fix: set channel to none and ignore type errors
This commit is contained in:
parent
cc571f17f2
commit
5b036d843a
|
|
@ -202,7 +202,7 @@ class Player(VoiceProtocol):
|
||||||
if not self.is_playing:
|
if not self.is_playing:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
return self.current.length / self.rate
|
return self.current.length / self.rate # type: ignore
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_playing(self) -> bool:
|
def is_playing(self) -> bool:
|
||||||
|
|
@ -399,7 +399,7 @@ class Player(VoiceProtocol):
|
||||||
finally:
|
finally:
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
self._is_connected = False
|
self._is_connected = False
|
||||||
del self.channel
|
self.channel = None # type: ignore
|
||||||
|
|
||||||
async def destroy(self) -> None:
|
async def destroy(self) -> None:
|
||||||
"""Disconnects and destroys the player, and runs internal cleanup."""
|
"""Disconnects and destroys the player, and runs internal cleanup."""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue