From 0d78b00342174159c20373838142c89ad5221fbe Mon Sep 17 00:00:00 2001 From: NiceAesth Date: Mon, 13 Mar 2023 15:30:25 +0200 Subject: [PATCH] fix: type __call__ function --- Pipfile | 2 ++ pomice/player.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index c76e209..c0aebbe 100644 --- a/Pipfile +++ b/Pipfile @@ -13,6 +13,8 @@ pre-commit = "*" furo = "*" sphinx = "*" myst-parser = "*" +black = "*" +typing-extensions = "*" [requires] python_version = "3.8" diff --git a/pomice/player.py b/pomice/player.py index ecc180b..e1e84e8 100644 --- a/pomice/player.py +++ b/pomice/player.py @@ -132,7 +132,11 @@ class Player(VoiceProtocol): ) def __call__(self, client: Client, channel: VoiceChannel) -> Player: - return self.__class__(client, channel) + self.client = client + self.channel = channel + self._guild = channel.guild + + return self def __init__( self,