diff --git a/wavelink/__init__.py b/wavelink/__init__.py index b4baa306..af87e762 100644 --- a/wavelink/__init__.py +++ b/wavelink/__init__.py @@ -2,7 +2,7 @@ __author__ = 'EvieePy' __license__ = 'MIT' __copyright__ = 'Copyright 2019 (c) EvieePy' -__version__ = '0.3.05' +__version__ = '0.3.06' from .client import Client from .errors import * diff --git a/wavelink/player.py b/wavelink/player.py index 085ae825..d3e706de 100644 --- a/wavelink/player.py +++ b/wavelink/player.py @@ -207,7 +207,7 @@ async def disconnect(self): self.channel_id = None await self._get_shard_socket(guild.shard_id).voice_state(self.guild_id, None) - async def play(self, track: Track, *, replace: bool=True): + async def play(self, track: Track, *, replace: bool = True, start: int = 0): """|coro| Play a WaveLink Track. @@ -218,6 +218,8 @@ async def play(self, track: Track, *, replace: bool=True): The :class:`Track` to initiate playing. replace: bool Whether or not the current track, if there is one, should be replaced or not. Defaults to True. + start: int + The position to start the player from in milliseconds """ self.last_update = 0 self.last_position = 0 @@ -227,7 +229,11 @@ async def play(self, track: Track, *, replace: bool=True): no_replace = not replace self.current = track - await self.node._send(op='play', guildId=str(self.guild_id), track=track.id, noReplace=no_replace) + await self.node._send(op='play', + guildId=str(self.guild_id), + track=track.id, + noReplace=no_replace, + startTime=str(start)) __log__.debug(f'PLAYER | Started playing track:: {str(track)} ({self.channel_id})') async def stop(self):