Streams Music instead of downloading

pull/4/head
sgoudham 4 years ago
parent f0e371ee3e
commit d9d4fc89d4

@ -77,7 +77,7 @@ class Music(commands.Cog):
"""Plays from a url (almost anything youtube_dl supports)""" """Plays from a url (almost anything youtube_dl supports)"""
async with ctx.typing(): async with ctx.typing():
player = await YTDLSource.from_url(url, loop=self.bot.loop) player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)
ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None) ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
await ctx.send('Now playing: **{}**'.format(player.title)) await ctx.send('Now playing: **{}**'.format(player.title))

Loading…
Cancel
Save