Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code. #134

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions AlexaMusic/plugins/play/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@


@app.on_message(
filters.command(STREAM_COMMAND)
& filters.group
& ~filters.edited
& ~BANNED_USERS
filters.command(STREAM_COMMAND) & filters.group & ~filters.edited & ~BANNED_USERS
)
@PlayWrapper
async def stream_command(
Expand Down Expand Up @@ -58,9 +55,7 @@ async def stream_command(
"ᴘʟᴇᴀsᴇ ᴛᴜʀɴ ᴏɴ ᴠᴏɪᴄᴇ ᴄʜᴀᴛ.. ʙᴏᴛ ɪs ɴᴏᴛ ᴀʙʟᴇ ᴛᴏ sᴛʀᴇᴀᴍ ᴜʀʟs..",
)
except Exception as e:
return await mystic.edit_text(
_["general_3"].format(type(e).__name__)
)
return await mystic.edit_text(_["general_3"].format(type(e).__name__))
await mystic.edit_text(_["str_2"])
try:
await stream(
Expand All @@ -76,14 +71,8 @@ async def stream_command(
)
except Exception as e:
ex_type = type(e).__name__
err = (
e
if ex_type == "AssistantErr"
else _["general_3"].format(ex_type)
)
err = e if ex_type == "AssistantErr" else _["general_3"].format(ex_type)
return await mystic.edit_text(err)
return await play_logs(
message, streamtype="M3u8 or Index Link"
)
return await play_logs(message, streamtype="M3u8 or Index Link")
else:
await message.reply_text(_["str_1"])
await message.reply_text(_["str_1"])