This commit is contained in:
BarsTiger
2021-04-14 10:10:04 +03:00
parent de18346d64
commit fbda8ec3e0

View File

@@ -1,7 +1,6 @@
import asyncio
import discord
import youtube_dl
from discord.ext import commands
# Suppress noise about console usage from errors
@@ -89,7 +88,7 @@ class Music(commands.Cog):
async with ctx.typing():
player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)
ctx.voice_client.play("ffmpeg.exe", 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))
@@ -123,7 +122,7 @@ class Music(commands.Cog):
ctx.voice_client.stop()
bot = commands.Bot(command_prefix=commands.when_mentioned_or("/"),
description="SnakieCat bot")
description="SoundyCat bot")
@bot.event
async def on_ready():