From 6731917ea6bc1821ebede77ea52979504ef282fd Mon Sep 17 00:00:00 2001 From: TheChampu Date: Fri, 30 Aug 2024 05:03:10 +0000 Subject: [PATCH] Pylint: Auto Fixes --- ChampuXMusic/plugins/play/play.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/ChampuXMusic/plugins/play/play.py b/ChampuXMusic/plugins/play/play.py index 1579c49..8c4811e 100644 --- a/ChampuXMusic/plugins/play/play.py +++ b/ChampuXMusic/plugins/play/play.py @@ -26,8 +26,19 @@ @app.on_message( - filters.command(["play", "vplay", "cplay", "cvplay", "playforce", "vplayforce", "cplayforce", "cvplayforce"] ,prefixes=["/", "!", "%", ",", "", ".", "@", "#"]) - + filters.command( + [ + "play", + "vplay", + "cplay", + "cvplay", + "playforce", + "vplayforce", + "cplayforce", + "cvplayforce", + ], + prefixes=["/", "!", "%", ",", "", ".", "@", "#"], + ) & filters.group & ~BANNED_USERS ) @@ -167,7 +178,9 @@ async def play_commnd( cap = _["play_10"] elif "https://youtu.be" in url: videoid = url.split("/")[-1].split("?")[0] - details, track_id = await YouTube.track(f"https://www.youtube.com/watch?v={videoid}") + details, track_id = await YouTube.track( + f"https://www.youtube.com/watch?v={videoid}" + ) streamtype = "youtube" img = details["thumb"] cap = _["play_11"].format( @@ -185,7 +198,7 @@ async def play_commnd( cap = _["play_11"].format( details["title"], details["duration_min"], - ) + ) elif await Spotify.valid(url): spotify = True if not config.SPOTIFY_CLIENT_ID and not config.SPOTIFY_CLIENT_SECRET: @@ -664,6 +677,7 @@ async def slider_queries(client, CallbackQuery, _): media=med, reply_markup=InlineKeyboardMarkup(buttons) ) + __MODULE__ = "Play" __HELP__ = """ `/play [song name/link]`: Play a song. @@ -674,4 +688,4 @@ async def slider_queries(client, CallbackQuery, _): `/vplayforce [video name/link]`: Force play a video. `/cplayforce [channel song name/link]`: Force play a song in a channel. `/cvplayforce [channel video name/link]`: Force play a video in a channel. -""" \ No newline at end of file +"""