Skip to content

Commit

Permalink
Update stream.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BUDDY1609 authored Apr 3, 2023
1 parent c90dfa5 commit 238868a
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions Adarsh/bot/plugins/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
async def login_handler(c: Client, m: Message):
try:
try:
ag = await m.reply_text("Now send me password.\n\n for password send 10rs to `sharundas123@ybl` and send screen shot to @kwicadmin \n\n (for running bot need contributions..unwanted message = ban + report)")
ag = await m.reply_text("Now send me password.\n\n OR Do Not Try again")
_text = await c.listen(m.chat.id, filters=filters.text, timeout=90)
if _text.text:
textp = _text.text
Expand All @@ -34,13 +34,13 @@ async def login_handler(c: Client, m: Message):
else:
return
except TimeoutError:
await ag.edit("I can't wait more for password, try again")
await ag.edit("I can't wait more for password,so do not try again")
return
if textp == MY_PASS:
await pass_db.add_user_pass(m.chat.id, textp)
ag_text = "yeah! you entered the password correctly"
ag_text = "yeah! you entered the password correctly thx u"
else:
ag_text = "Wrong password, try again"
ag_text = "sorry. Wrong password,do not try again"
await ag.edit(ag_text)
except Exception as e:
print(e)
Expand All @@ -50,7 +50,7 @@ async def private_receive_handler(c: Client, m: Message):
if MY_PASS:
check_pass = await pass_db.get_user_pass(m.chat.id)
if check_pass== None:
await m.reply_text("ʟᴏɢɪɴ ғɪʀsᴛ ᴜsɪɴɢ /login ᴄᴍᴅ(ᴛʏᴘᴇ /login) \n\n for password send 10rs to `sharundas123@ybl` and send screen shot to @kwicadmin \n\n (for running bot need contributions..unwanted message = ban + report)")
await m.reply_text("ʟᴏɢɪɴ ғɪʀsᴛ ᴜsɪɴɢ /login ᴄᴍᴅ(ᴛʏᴘᴇ /login)")
return
if check_pass != MY_PASS:
await pass_db.delete_user(m.chat.id)
Expand Down Expand Up @@ -110,18 +110,15 @@ async def private_receive_handler(c: Client, m: Message):
<b>💌 ᴅᴏᴡɴʟᴏᴀᴅ ʟɪɴᴋ :- </b> <i><b>{}</b></i>
<b>🖥 ᴡᴀʏᴄʜ ᴏɴʟɪɴᴇ :- </b> <i><b>{}</b></i>
<b>♻️ ᴛʜɪs ʟɪɴᴋ ɪs ᴘᴇʀᴍᴀɴᴇɴᴛ ᴀɴᴅ ᴡᴏɴ'ᴛ ɢᴇᴛs ᴇxᴘɪʀᴇᴅ ♻️\n\n@MoviesNowV2</b>"""
<b>♻️ Powered By :- @tg_movielink ♻️</b>"""

await log_msg.reply_text(text=f"**RᴇQᴜᴇꜱᴛᴇᴅ ʙʏ :** [{m.from_user.first_name}](tg://user?id={m.from_user.id})\n**Uꜱᴇʀ ɪᴅ :** `{m.from_user.id}`\n**Stream ʟɪɴᴋ :** {stream_link}", disable_web_page_preview=True, quote=True)
await m.reply_text(
text=msg_text.format(get_name(log_msg), humanbytes(get_media_file_size(m)), online_link, stream_link),

quote=True,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⚡ ᴡᴀᴛᴄʜ ⚡", url=stream_link), #Stream Link
InlineKeyboardButton('⚡ ᴅᴏᴡɴʟᴏᴀᴅ ⚡', url=online_link)]]) #Download Link
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton('⚡ ᴅᴏᴡɴʟᴏᴀᴅ ⚡', url=online_link)]]) #Download Link
)
except FloodWait as e:
print(f"Sleeping for {str(e.x)}s")
Expand All @@ -134,10 +131,10 @@ async def channel_receive_handler(bot, broadcast):
if MY_PASS:
check_pass = await pass_db.get_user_pass(broadcast.chat.id)
if check_pass == None:
await broadcast.reply_text("Login first using /login cmd \n don\'t know the pass? request it from @kwicadmin")
await broadcast.reply_text("Login first using /login cmd \n don\'t know the pass? do not try again")
return
if check_pass != MY_PASS:
await broadcast.reply_text("Wrong password, login again")
await broadcast.reply_text("sorry. Wrong password, do not try again")
await pass_db.delete_user(broadcast.chat.id)
return
if int(broadcast.chat.id) in Var.BANNED_CHANNELS:
Expand All @@ -156,8 +153,7 @@ async def channel_receive_handler(bot, broadcast):
id=broadcast.id,
reply_markup=InlineKeyboardMarkup(
[
[InlineKeyboardButton("⚡ ᴡᴀᴛᴄʜ ⚡", url=stream_link),
InlineKeyboardButton('⚡ ᴅᴏᴡɴʟᴏᴀᴅ ⚡', url=online_link)]
[InlineKeyboardButton('⚡ ᴅᴏᴡɴʟᴏᴀᴅ ⚡', url=online_link)]
]
)
)
Expand Down

0 comments on commit 238868a

Please sign in to comment.