fix event tracks

This commit is contained in:
cloudwithax 2023-03-13 19:37:29 -04:00
parent 6d96a9e53d
commit 14ba273d35
8 changed files with 9 additions and 5 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ Pipfile.lock
.vscode/
.venv/
*.code-workspace
*.ini

View File

@ -1,3 +1,4 @@
# type: ignore
import importlib
import inspect
import os

View File

@ -93,7 +93,7 @@ await NodePool.create_node(
spotify_client_secret="<your spotify client secret here>"
apple_music=<True/False>,
fallback=<True/False>,
log_level=<optiona LogLevel here>
log_level=<optional LogLevel here>
)
```

View File

@ -1,3 +1,4 @@
# type: ignore
"""
This example aims to show the full capabilities of the library.
This is in the form of a drop-in cog you can use and modify to your liking.

View File

@ -1,3 +1,4 @@
# type: ignore
import discord
from discord.ext import commands

View File

@ -65,7 +65,7 @@ class TrackStartEvent(PomiceEvent):
self.handler_args = self.player, self.track
def __repr__(self) -> str:
return f"<Pomice.TrackStartEvent player={self.player} track_id={self.track.track_id}>"
return f"<Pomice.TrackStartEvent player={self.player!r} track={self.track!r}>"
class TrackEndEvent(PomiceEvent):
@ -87,8 +87,8 @@ class TrackEndEvent(PomiceEvent):
def __repr__(self) -> str:
return (
f"<Pomice.TrackEndEvent player={self.player} track_id={self.track.track_id} "
f"reason={self.reason}>"
f"<Pomice.TrackEndEvent player={self.player!r} track_id={self.track!r} "
f"reason={self.reason!r}>"
)

View File

@ -149,7 +149,6 @@ class Player(VoiceProtocol):
self.channel: VoiceChannel = channel
self._bot: Client = client
self._guild: Guild = channel.guild
self._node: Node = node if node else NodePool.get_node()
self._current: Optional[Track] = None
self._filters: Filters = Filters()

View File

@ -1,3 +1,4 @@
# type: ignore
import re
import setuptools