
Python
3
Вклад в тег
@slash_command(name="join",description="Подключить бота")
async def _join(self, ctx: commands.Context):
"""Подключается к голосовому каналу."""
ctx.voice_state = self.get_voice_state(ctx)
await ctx.reply(..., type=5)
destination = ctx.author.voice.channel
if ctx.voice_state.voice:
await ctx.voice_state.voice.move_to(destination)
return
ctx.voice_state.voice = await destination.connect()