async def leave(ctx): channel = ctx.message.author.voice.channel voice = discord.utils.get(client.voice_clients, guild=ctx.guild) if voice and voice.is_connected(): await voice.disconnect() else: voice = await channel.connect() await ctx.message.add_reaction('✅')
async def join(ctx): global voice channel = ctx.message.author.voice.channel voice = get(client.voice_clients, guild=ctx.guild) if voice and voice.is_connected(): await voice.move_to(channel) else: voice = await channel.connect() await ctx.message.add_reaction('✅')
async def join(ctx): global voice channel = ctx.message.author.voice.channel voice = get(Bot.voice_clients, guild=ctx.guild) if voice and voice.is_connected(): await voice.move_to(channel) else: voice = await channel.connect() await voice.disconnect() if voice and voice.is_connected(): await voice.move_to(channel) else: voice = await channel.connect() await ctx.send(f'Бот присоединился к каналу: {channel}') await ctx.send(f'Joined {channel}')
async def leave(ctx): channel = ctx.message.author.voice.channel voice = get(Bot.voice_clients, guild=ctx.guild) if voice and voice.is_connected(): await voice.disconnect() print(f'Бот покинул {channel}') await ctx.send(f'Left {channel}') else: print('Bot was told to leave voice channel, but was noy in one') await ctx.send('Dont think im in a voice channel')