@@ -98,7 +98,7 @@ def __init__(
98
98
self ._connected : bool = False
99
99
self ._paused : bool = False
100
100
101
- self ._volume : float = 1.0
101
+ self ._volume : int = 100
102
102
self ._source : Optional [abc .Playable ] = None
103
103
self ._filter : Optional [Filter ] = None
104
104
@@ -115,7 +115,7 @@ def user(self) -> discord.ClientUser:
115
115
return self .client .user # type: ignore
116
116
117
117
@property
118
- def volume (self ) -> float :
118
+ def volume (self ) -> int :
119
119
return self ._volume
120
120
121
121
@property
@@ -215,10 +215,10 @@ async def play(
215
215
self ,
216
216
source : abc .Playable ,
217
217
replace : bool = True ,
218
- start : int | None = None ,
219
- end : int | None = None ,
220
- volume : int | None = None ,
221
- pause : bool | None = None ,
218
+ start : Optional [ int ] = None ,
219
+ end : Optional [ int ] = None ,
220
+ volume : Optional [ int ] = None ,
221
+ pause : Optional [ bool ] = None ,
222
222
):
223
223
"""|coro|
224
224
@@ -331,18 +331,18 @@ async def resume(self) -> None:
331
331
"""
332
332
await self .set_pause (False )
333
333
334
- async def set_volume (self , volume : float ) -> None :
334
+ async def set_volume (self , volume : int ) -> None :
335
335
"""|coro|
336
336
337
- Sets the players volume. Accepts a float between ``0.0 `` and ``10.0 `` where ``1.0 `` means 100% volume.
337
+ Sets the players volume. Accepts a float between ``0`` and ``1000 `` where ``100 `` means 100% volume.
338
338
339
339
Parameters
340
340
----------
341
341
volume: int
342
342
The volume to set the player to.
343
343
"""
344
344
345
- self ._volume = max (min (volume * 100 , 1000 ), 0 )
345
+ self ._volume = max (min (volume , 1000 ), 0 )
346
346
347
347
await self .node ._websocket .send (
348
348
op = "volume" ,
0 commit comments