mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-22 03:14:58 +00:00
style: format code with black
Format code with black
This commit fixes the style issues introduced in 0c19098
according to the output
from Black.
Details: None
This commit is contained in:
parent
0c1909807a
commit
3cf308a34b
4 changed files with 50 additions and 32 deletions
|
@ -4,8 +4,8 @@ from discord.ext import commands
|
|||
from lynxie.utils import error_message
|
||||
|
||||
|
||||
ffmpeg_options = {'options': '-vn'}
|
||||
ydl_opts = {'format': 'bestaudio'}
|
||||
ffmpeg_options = {"options": "-vn"}
|
||||
ydl_opts = {"format": "bestaudio"}
|
||||
ytdl = yt_dlp.YoutubeDL(ydl_opts)
|
||||
|
||||
|
||||
|
@ -25,13 +25,15 @@ class Music(commands.Cog):
|
|||
try:
|
||||
song_info = ytdl.extract_info(url, download=False)
|
||||
print(song_info["url"])
|
||||
ctx.voice_client.play(discord.FFmpegPCMAudio(song_info["url"], **ffmpeg_options))
|
||||
ctx.voice_client.play(
|
||||
discord.FFmpegPCMAudio(song_info["url"], **ffmpeg_options)
|
||||
)
|
||||
except Exception:
|
||||
await ctx.reply(
|
||||
embed=error_message(
|
||||
"An error occurred while processing this request."
|
||||
),
|
||||
mention_author=False
|
||||
mention_author=False,
|
||||
)
|
||||
return
|
||||
|
||||
|
@ -49,7 +51,7 @@ class Music(commands.Cog):
|
|||
else:
|
||||
await ctx.reply(
|
||||
embed=error_message("You are not connected to a voice channel!"),
|
||||
mention_author=False
|
||||
mention_author=False,
|
||||
)
|
||||
elif ctx.voice_client.is_playing():
|
||||
ctx.voice_client.stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue