mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-23 11:54:57 +00:00
Further cleanup to make Deepsource happy
This commit is contained in:
parent
42a41509c5
commit
dae2d4901c
5 changed files with 21 additions and 19 deletions
|
@ -22,18 +22,13 @@ class Music(commands.Cog):
|
|||
@commands.command()
|
||||
async def play(self, ctx, *, url):
|
||||
async with ctx.typing():
|
||||
try:
|
||||
song_info = ytdl.extract_info(url, download=False)
|
||||
ctx.voice_client.play(
|
||||
discord.FFmpegPCMAudio(song_info["url"], **ffmpeg_options)
|
||||
song_info = ytdl.extract_info(url, download=False)
|
||||
ctx.voice_client.play(
|
||||
discord.FFmpegPCMAudio(
|
||||
song_info["url"],
|
||||
**ffmpeg_options
|
||||
)
|
||||
except Exception as err:
|
||||
error = "An error occurred while processing this request." + str(err)
|
||||
await ctx.reply(
|
||||
embed=error_message(error),
|
||||
mention_author=False,
|
||||
)
|
||||
return
|
||||
)
|
||||
|
||||
embed = discord.Embed(
|
||||
title="Now playing",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue