diff --git a/wavelink/__init__.py b/wavelink/__init__.py index dba3c50c..f98664cf 100644 --- a/wavelink/__init__.py +++ b/wavelink/__init__.py @@ -2,7 +2,7 @@ __author__ = 'EvieePy' __license__ = 'MIT' __copyright__ = 'Copyright 2019-2020 (c) PythonistaGuild' -__version__ = '0.4.02' +__version__ = '0.5.0' from .client import Client from .errors import * diff --git a/wavelink/player.py b/wavelink/player.py index 1ed6a31b..9def3f47 100644 --- a/wavelink/player.py +++ b/wavelink/player.py @@ -321,42 +321,24 @@ async def destroy(self) -> None: await self.node._send(op='destroy', guildId=str(self.guild_id)) del self.node.players[self.guild_id] - async def set_preq(self, mode: str) -> str: + async def set_eq(self, equalizer: Equalizer) -> None: """|coro| - Set the Players Equalizer from a Pre-made list. If no/invalid mode is provided, the EQ will be reset. + Set the Players Equalizer. - Modes - ------- - Flat: - The base EQ. Complete FlatLine. - Boost: - A Bass and Snare boost. Suitable to DNB type music. - Metal: - A metal/metal rock boost. + Parameters + ------------ + equalizer: :class:`Equalizer` + The Equalizer to set. """ - name = mode - - mode = self.equalizers.get(mode.upper(), Equalizer.flat()) - await self.node._send(op='equalizer', guildId=str(self.guild_id), bands=mode.eq) - - return name + await self.node._send(op='equalizer', guildId=str(self.guild_id), bands=equalizer.eq) - async def set_eq(self, *, levels: list): + async def set_equalizer(self, equalizer: Equalizer) -> None: """|coro| - Set the Players Equalizer. A list of tuples ranged for 0 to 14 with a gain will be accepted. - - Bands: 0 - 14 - Gains: -0.25 - 1.0 - - Example - --------- - [(0, .1), (7, .5), (8, .5)] + An alias to :func:`set_eq`. """ - equalizer = Equalizer.build(levels=levels) - - await self.node._send(op='equalizer', guildId=str(self.guild_id), bands=equalizer.eq) + await self.set_eq(equalizer) async def set_pause(self, pause: bool) -> None: """|coro|