loading...

Discord bot Python

scriptingbeyrbx profile image BeyGame Officiel FR ・1 min read

It does not work I think I am out of date, please help me

Error : Command raised an exception: AttributeError: 'VoiceClient' object has no attribute 'create_ytdl_player'

My code:



@bot.command(pass_context=True)
async def play(ctx, url):
    author = ctx.message.author
    channel = author.voice.channel
    vc = await channel.connect()
    player = await vc.create_ytdl_player(url)
    player.start()

Discussion

markdown guide