From f1a4eecf827767440f815b912dba7fa369b11ec6 Mon Sep 17 00:00:00 2001 From: TheTeamAlexa Date: Thu, 30 Nov 2023 09:48:38 +0000 Subject: [PATCH] Formate By @TheTeamAlexa Signed-off-by: TheTeamAlexa --- AlexaMusic/plugins/admins/auth.py | 12 +++--------- AlexaMusic/plugins/admins/loop.py | 4 +--- AlexaMusic/plugins/admins/mute.py | 4 +--- AlexaMusic/plugins/admins/pause.py | 4 +--- AlexaMusic/plugins/admins/resume.py | 4 +--- AlexaMusic/plugins/admins/seek.py | 4 +--- AlexaMusic/plugins/admins/shuffle.py | 4 +--- AlexaMusic/plugins/admins/skip.py | 4 +--- AlexaMusic/plugins/admins/stop.py | 4 +--- AlexaMusic/plugins/admins/unmute.py | 4 +--- AlexaMusic/plugins/bot/help.py | 8 ++------ AlexaMusic/plugins/bot/settings.py | 4 +--- AlexaMusic/plugins/bot/start.py | 8 ++------ AlexaMusic/plugins/play/channel.py | 6 +----- AlexaMusic/plugins/play/play.py | 4 +--- AlexaMusic/plugins/play/playlist.py | 10 ++-------- AlexaMusic/plugins/play/playmode.py | 4 +--- AlexaMusic/utils/command.py | 4 +--- 18 files changed, 23 insertions(+), 73 deletions(-) diff --git a/AlexaMusic/plugins/admins/auth.py b/AlexaMusic/plugins/admins/auth.py index a6b14d77..2087c97c 100644 --- a/AlexaMusic/plugins/admins/auth.py +++ b/AlexaMusic/plugins/admins/auth.py @@ -31,9 +31,7 @@ AUTHUSERS_COMMAND = get_command("AUTHUSERS_COMMAND") -@app.on_message( - filters.command(AUTH_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(AUTH_COMMAND) & filters.group & ~BANNED_USERS) @AdminActual async def auth(client, message: Message, _): if not message.reply_to_message: @@ -95,9 +93,7 @@ async def auth(client, message: Message, _): await message.reply_text(_["auth_3"]) -@app.on_message( - filters.command(UNAUTH_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(UNAUTH_COMMAND) & filters.group & ~BANNED_USERS) @AdminActual async def unauthusers(client, message: Message, _): if not message.reply_to_message: @@ -130,9 +126,7 @@ async def unauthusers(client, message: Message, _): return await message.reply_text(_["auth_5"]) -@app.on_message( - filters.command(AUTHUSERS_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(AUTHUSERS_COMMAND) & filters.group & ~BANNED_USERS) @language async def authusers(client, message: Message, _): _playlist = await get_authuser_names(message.chat.id) diff --git a/AlexaMusic/plugins/admins/loop.py b/AlexaMusic/plugins/admins/loop.py index 2911f284..0482e4e3 100644 --- a/AlexaMusic/plugins/admins/loop.py +++ b/AlexaMusic/plugins/admins/loop.py @@ -23,9 +23,7 @@ LOOP_COMMAND = get_command("LOOP_COMMAND") -@app.on_message( - filters.command(LOOP_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(LOOP_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def admins(cli, message: Message, _, chat_id): usage = _["admin_24"] diff --git a/AlexaMusic/plugins/admins/mute.py b/AlexaMusic/plugins/admins/mute.py index 3678a011..d81d02c4 100644 --- a/AlexaMusic/plugins/admins/mute.py +++ b/AlexaMusic/plugins/admins/mute.py @@ -24,9 +24,7 @@ MUTE_COMMAND = get_command("MUTE_COMMAND") -@app.on_message( - filters.command(MUTE_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(MUTE_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def mute_admin(cli, message: Message, _, chat_id): if not len(message.command) == 1 or message.reply_to_message: diff --git a/AlexaMusic/plugins/admins/pause.py b/AlexaMusic/plugins/admins/pause.py index a5943821..6dbaef49 100644 --- a/AlexaMusic/plugins/admins/pause.py +++ b/AlexaMusic/plugins/admins/pause.py @@ -24,9 +24,7 @@ PAUSE_COMMAND = get_command("PAUSE_COMMAND") -@app.on_message( - filters.command(PAUSE_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(PAUSE_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def pause_admin(cli, message: Message, _, chat_id): if not len(message.command) == 1: diff --git a/AlexaMusic/plugins/admins/resume.py b/AlexaMusic/plugins/admins/resume.py index 8e5508cd..aa8fd0f6 100644 --- a/AlexaMusic/plugins/admins/resume.py +++ b/AlexaMusic/plugins/admins/resume.py @@ -24,9 +24,7 @@ RESUME_COMMAND = get_command("RESUME_COMMAND") -@app.on_message( - filters.command(RESUME_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(RESUME_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def resume_com(cli, message: Message, _, chat_id): if not len(message.command) == 1: diff --git a/AlexaMusic/plugins/admins/seek.py b/AlexaMusic/plugins/admins/seek.py index f5caece5..4a3c93d0 100644 --- a/AlexaMusic/plugins/admins/seek.py +++ b/AlexaMusic/plugins/admins/seek.py @@ -24,9 +24,7 @@ SEEK_COMMAND = get_command("SEEK_COMMAND") -@app.on_message( - filters.command(SEEK_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(SEEK_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def seek_comm(cli, message: Message, _, chat_id): if len(message.command) == 1: diff --git a/AlexaMusic/plugins/admins/shuffle.py b/AlexaMusic/plugins/admins/shuffle.py index 6c036073..82a91b9e 100644 --- a/AlexaMusic/plugins/admins/shuffle.py +++ b/AlexaMusic/plugins/admins/shuffle.py @@ -25,9 +25,7 @@ SHUFFLE_COMMAND = get_command("SHUFFLE_COMMAND") -@app.on_message( - filters.command(SHUFFLE_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(SHUFFLE_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def admins(Client, message: Message, _, chat_id): if not len(message.command) == 1: diff --git a/AlexaMusic/plugins/admins/skip.py b/AlexaMusic/plugins/admins/skip.py index 2d4a14cc..5728783f 100644 --- a/AlexaMusic/plugins/admins/skip.py +++ b/AlexaMusic/plugins/admins/skip.py @@ -30,9 +30,7 @@ SKIP_COMMAND = get_command("SKIP_COMMAND") -@app.on_message( - filters.command(SKIP_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(SKIP_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def skip(cli, message: Message, _, chat_id): if not len(message.command) < 2: diff --git a/AlexaMusic/plugins/admins/stop.py b/AlexaMusic/plugins/admins/stop.py index 78f6a60c..778ef513 100644 --- a/AlexaMusic/plugins/admins/stop.py +++ b/AlexaMusic/plugins/admins/stop.py @@ -22,9 +22,7 @@ STOP_COMMAND = get_command("STOP_COMMAND") -@app.on_message( - filters.command(STOP_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(STOP_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def stop_music(cli, message: Message, _, chat_id): if not len(message.command) == 1: diff --git a/AlexaMusic/plugins/admins/unmute.py b/AlexaMusic/plugins/admins/unmute.py index 6ac4aa44..6bf0716d 100644 --- a/AlexaMusic/plugins/admins/unmute.py +++ b/AlexaMusic/plugins/admins/unmute.py @@ -24,9 +24,7 @@ UNMUTE_COMMAND = get_command("UNMUTE_COMMAND") -@app.on_message( - filters.command(UNMUTE_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(UNMUTE_COMMAND) & filters.group & ~BANNED_USERS) @AdminRightsCheck async def unmute_admin(Client, message: Message, _, chat_id): if not len(message.command) == 1 or message.reply_to_message: diff --git a/AlexaMusic/plugins/bot/help.py b/AlexaMusic/plugins/bot/help.py index 76540460..bc05d80f 100644 --- a/AlexaMusic/plugins/bot/help.py +++ b/AlexaMusic/plugins/bot/help.py @@ -28,9 +28,7 @@ HELP_COMMAND = get_command("HELP_COMMAND") -@app.on_message( - filters.command(HELP_COMMAND) & filters.private & ~BANNED_USERS -) +@app.on_message(filters.command(HELP_COMMAND) & filters.private & ~BANNED_USERS) @app.on_callback_query(filters.regex("settings_back_helper") & ~BANNED_USERS) async def helper_private( client: app, update: Union[types.Message, types.CallbackQuery] @@ -63,9 +61,7 @@ async def helper_private( await update.reply_text(_["help_1"], reply_markup=keyboard) -@app.on_message( - filters.command(HELP_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(HELP_COMMAND) & filters.group & ~BANNED_USERS) @LanguageStart async def help_com_group(client, message: Message, _): keyboard = private_help_panel(_) diff --git a/AlexaMusic/plugins/bot/settings.py b/AlexaMusic/plugins/bot/settings.py index 0940482d..5a3b8b5d 100644 --- a/AlexaMusic/plugins/bot/settings.py +++ b/AlexaMusic/plugins/bot/settings.py @@ -63,9 +63,7 @@ SETTINGS_COMMAND = get_command("SETTINGS_COMMAND") -@app.on_message( - filters.command(SETTINGS_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(SETTINGS_COMMAND) & filters.group & ~BANNED_USERS) @language async def settings_mar(client, message: Message, _): buttons = setting_markup(_) diff --git a/AlexaMusic/plugins/bot/start.py b/AlexaMusic/plugins/bot/start.py index fae27925..7b6e3f89 100644 --- a/AlexaMusic/plugins/bot/start.py +++ b/AlexaMusic/plugins/bot/start.py @@ -44,9 +44,7 @@ @app.on_message( - filters.command(get_command("START_COMMAND")) - & filters.private - & ~BANNED_USERS + filters.command(get_command("START_COMMAND")) & filters.private & ~BANNED_USERS ) @LanguageStart async def start_comm(client, message: Message, _): @@ -215,9 +213,7 @@ def get_stats(): @app.on_message( - filters.command(get_command("START_COMMAND")) - & filters.group - & ~BANNED_USERS + filters.command(get_command("START_COMMAND")) & filters.group & ~BANNED_USERS ) @LanguageStart async def testbot(client, message: Message, _): diff --git a/AlexaMusic/plugins/play/channel.py b/AlexaMusic/plugins/play/channel.py index 56f304cd..b68c3056 100644 --- a/AlexaMusic/plugins/play/channel.py +++ b/AlexaMusic/plugins/play/channel.py @@ -22,11 +22,7 @@ CHANNELPLAY_COMMAND = get_command("CHANNELPLAY_COMMAND") -@app.on_message( - filters.command(CHANNELPLAY_COMMAND) - & filters.group - & ~BANNED_USERS -) +@app.on_message(filters.command(CHANNELPLAY_COMMAND) & filters.group & ~BANNED_USERS) @AdminActual async def playmode_(client, message: Message, _): if len(message.command) < 2: diff --git a/AlexaMusic/plugins/play/play.py b/AlexaMusic/plugins/play/play.py index 093f6c36..3ea24235 100644 --- a/AlexaMusic/plugins/play/play.py +++ b/AlexaMusic/plugins/play/play.py @@ -44,9 +44,7 @@ PLAY_COMMAND = get_command("PLAY_COMMAND") -@app.on_message( - filters.command(PLAY_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(PLAY_COMMAND) & filters.group & ~BANNED_USERS) @PlayWrapper async def play_commnd( client, diff --git a/AlexaMusic/plugins/play/playlist.py b/AlexaMusic/plugins/play/playlist.py index d4575d09..f69b751a 100644 --- a/AlexaMusic/plugins/play/playlist.py +++ b/AlexaMusic/plugins/play/playlist.py @@ -69,11 +69,7 @@ async def check_playlist(client, message: Message, _): await message.reply_photo(carbon, caption=_["playlist_15"].format(link)) -@app.on_message( - filters.command(DELETEPLAYLIST_COMMAND) - & filters.group - & ~BANNED_USERS -) +@app.on_message(filters.command(DELETEPLAYLIST_COMMAND) & filters.group & ~BANNED_USERS) @language async def del_group_message(client, message: Message, _): upl = InlineKeyboardMarkup( @@ -114,9 +110,7 @@ async def get_keyboard(_, user_id): @app.on_message( - filters.command(DELETEPLAYLIST_COMMAND) - & filters.private - & ~BANNED_USERS + filters.command(DELETEPLAYLIST_COMMAND) & filters.private & ~BANNED_USERS ) @language async def del_plist_msg(client, message: Message, _): diff --git a/AlexaMusic/plugins/play/playmode.py b/AlexaMusic/plugins/play/playmode.py index 3d1d695f..2c1c4d72 100644 --- a/AlexaMusic/plugins/play/playmode.py +++ b/AlexaMusic/plugins/play/playmode.py @@ -24,9 +24,7 @@ PLAYMODE_COMMAND = get_command("PLAYMODE_COMMAND") -@app.on_message( - filters.command(PLAYMODE_COMMAND) & filters.group & ~BANNED_USERS -) +@app.on_message(filters.command(PLAYMODE_COMMAND) & filters.group & ~BANNED_USERS) @language async def playmode_(client, message: Message, _): playmode = await get_playmode(message.chat.id) diff --git a/AlexaMusic/utils/command.py b/AlexaMusic/utils/command.py index 5453f88c..58dac712 100644 --- a/AlexaMusic/utils/command.py +++ b/AlexaMusic/utils/command.py @@ -13,9 +13,7 @@ from pyrogram import filters other_filters = filters.group & ~filters.via_bot & ~filters.forwarded -other_filters2 = ( - filters.private & ~filters.via_bot & ~filters.forwarded -) +other_filters2 = filters.private & ~filters.via_bot & ~filters.forwarded def commandpro(commands: Union[str, List[str]]):