File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 3434 RawVoiceServerUpdateEvent ,
3535 RawVoiceStateUpdateEvent ,
3636 )
37+ from discord .voice .client import VoiceClient
3738
3839ClientT = TypeVar ("ClientT" , bound = "Client" , covariant = True )
40+ VoiceClientT = TypeVar ('VoiceClientT' , bound = 'VoiceClient' , covariant = True )
3941
4042
4143class VoiceProtocol (Generic [ClientT ]):
@@ -157,3 +159,6 @@ def cleanup(self) -> None:
157159 """
158160 key , _ = self .channel ._get_voice_client_key ()
159161 self .client ._connection ._remove_voice_client (key )
162+
163+
164+ class RecorderProtocol (Generic [VoiceClientT ]):
Original file line number Diff line number Diff line change 2525from __future__ import annotations
2626
2727# TODO: finish this
28+
29+
30+ class Recorder :
31+ """Represents a voice recorder for a voice client.
32+
33+ You should not construct this but instead obtain it from :attr:`VoiceClient.recorder`.
34+
35+ .. versionadded:: 2.7
36+ """
37+
38+ def __init__ (self , client : VoiceClient ) -> None :
You can’t perform that action at this time.
0 commit comments