Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for self_deaf and self_mute in wavelink.Player.move_to #213

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions wavelink/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ async def connect(self, *, timeout: float, reconnect: bool, **kwargs: Any) -> No

await self.channel.guild.change_voice_state(channel=self.channel, **kwargs)

async def move_to(self, channel: discord.VoiceChannel) -> None:
async def move_to(self, channel: discord.VoiceChannel, self_mute: bool = False, self_deaf: bool = False) -> None:
Copy link
Member

@EvieePy EvieePy Jun 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change the new arguments to keyword arguments.
E.g ..., *, self_mute=, self_deaf=

"""|coro|

Moves the player to a different voice channel.
Expand All @@ -345,8 +345,12 @@ async def move_to(self, channel: discord.VoiceChannel) -> None:
-----------
channel: :class:`discord.VoiceChannel`
The channel to move to. Must be a voice channel.
self_mute: :class:`bool`
Indicates if the client should be self-muted.
self_deaf: :class:`bool`
Indicates if the client should be self-deafened.
"""
await self.guild.change_voice_state(channel=channel)
await self.guild.change_voice_state(channel=channel, self_mute=self_mute, self_deaf=self_deaf)
logger.info(f"Moving to voice channel:: {channel.id}")

async def play(self,
Expand Down