diff --git a/r0b3bot.py b/r0b3bot.py index 459b884..4cec7d8 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -95,21 +95,21 @@ async def bitch(ctx): await channel.disconnect() #@bot.command() -#async def bitch(ctx): -# user=ctx.message.author -# voice_channel=user.voice.voice_channel -# channel=None -# if voice_channel != None: -# channel=voice_channel.name -# vc= await bot.join_voice_channel(voice_channel) -# player = vc.create_ffmpeg_player('monkey_bitch.mp3', after=lambda: print('done')) -# player.start() -# while not player.is_done(): -# await asyncio.sleep(1) -# player.stop() -# await vc.disconnect() -# else: -# await ctx.send("User is not in a channel.") +async def bitch2(ctx): + user=ctx.message.author + voice_channel=user.voice.voice_channel + channel=None + if voice_channel != None: + channel=voice_channel.name + vc= await bot.join_voice_channel(voice_channel) + player = vc.create_ffmpeg_player('monkey_bitch.mp3', after=lambda: print('done')) + player.start() + while not player.is_done(): + await asyncio.sleep(1) + player.stop() + await vc.disconnect() + else: + await ctx.send("User is not in a channel.") ### #