Skip to content

Commit

Permalink
Code By @TheTeamAlexa
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTeamAlexa authored Jan 15, 2024
1 parent 3db6a2d commit d6222c7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions AlexaMusic/plugins/play/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@


@app.on_message(
filters.command(STREAM_COMMAND) & filters.group & ~filters.edited & ~BANNED_USERS
filters.command(STREAM_COMMAND)
& filters.group
& ~BANNED_USERS
)
@PlayWrapper
async def stream_command(
Expand Down Expand Up @@ -55,7 +57,9 @@ 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 @@ -71,8 +75,14 @@ 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"])

0 comments on commit d6222c7

Please sign in to comment.