Skip to content

Commit

Permalink
Merge pull request #94 from TheTeamAlexa/autofix
Browse files Browse the repository at this point in the history
Alexa Music
  • Loading branch information
TheTeamAlexa authored Nov 30, 2023
2 parents 77d13ed + f1a4eec commit f600328
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 73 deletions.
12 changes: 3 additions & 9 deletions AlexaMusic/plugins/admins/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/mute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/pause.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/seek.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/admins/unmute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 2 additions & 6 deletions AlexaMusic/plugins/bot/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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(_)
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/bot/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(_)
Expand Down
8 changes: 2 additions & 6 deletions AlexaMusic/plugins/bot/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, _):
Expand Down Expand Up @@ -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, _):
Expand Down
6 changes: 1 addition & 5 deletions AlexaMusic/plugins/play/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/play/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 2 additions & 8 deletions AlexaMusic/plugins/play/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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, _):
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/plugins/play/playmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions AlexaMusic/utils/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]):
Expand Down

0 comments on commit f600328

Please sign in to comment.