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 34
34
RawVoiceServerUpdateEvent ,
35
35
RawVoiceStateUpdateEvent ,
36
36
)
37
+ from discord .voice .client import VoiceClient
37
38
38
39
ClientT = TypeVar ("ClientT" , bound = "Client" , covariant = True )
40
+ VoiceClientT = TypeVar ('VoiceClientT' , bound = 'VoiceClient' , covariant = True )
39
41
40
42
41
43
class VoiceProtocol (Generic [ClientT ]):
@@ -157,3 +159,6 @@ def cleanup(self) -> None:
157
159
"""
158
160
key , _ = self .channel ._get_voice_client_key ()
159
161
self .client ._connection ._remove_voice_client (key )
162
+
163
+
164
+ class RecorderProtocol (Generic [VoiceClientT ]):
Original file line number Diff line number Diff line change 25
25
from __future__ import annotations
26
26
27
27
# 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