Initial Commit

This commit is contained in:
Avishkar Patil
2021-05-15 23:37:14 +05:30
committed by GitHub
parent 2bdc2b4ba3
commit 276632d19d

View File

@@ -1,4 +1,5 @@
# (c) @Avishkarpatil | @EverythingSuckz | @AbirHasan2005
# (c) @Avishkarpatil
import asyncio
from WebStreamer.bot import StreamBot
@@ -25,7 +26,7 @@ async def private_receive_handler(c: Client, m: Message):
if user.status == "kicked":
await c.send_message(
chat_id=m.chat.id,
text="Sorry Sir, You are Banned to use me. developer @Avishkarpatil",
text="__Sorry Sir, You are Banned to use me.__\n **Contact Developer @Avishkarpatil**",
parse_mode="markdown",
disable_web_page_preview=True
)
@@ -33,15 +34,15 @@ async def private_receive_handler(c: Client, m: Message):
except UserNotParticipant:
await c.send_message(
chat_id=m.chat.id,
text="**Please Join My Updates Channel to use this Bot!**\n\nDue to Overload, Only Channel Subscribers can use the Bot!",
text="""<i>Jɪɴ ᴍʏ ᴜᴘᴅᴀᴛᴇ ᴄʜᴀɴɴᴇʟ ᴛᴏ ᴜꜱᴇ ᴍᴇ 🔐</i>""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("🤖 Join Updates Channel", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
InlineKeyboardButton("Jɪɴ ɴᴏᴡ 🔓", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
]
]
),
parse_mode="markdown"
parse_mode="HTML"
)
return
except Exception:
@@ -73,11 +74,23 @@ async def private_receive_handler(c: Client, m: Message):
elif m.audio:
file_name = f"{m.audio.file_name}"
msg_text = "Bruh! 😁\nYour Link Generated! 🤓\n\n📂 **File Name:** `{}`\n**File Size:** `{}`\n\n📥 **Download Link:** `{}`"
await log_msg.reply_text(text=f"Requested by [{m.from_user.first_name}](tg://user?id={m.from_user.id})\n**User ID:** `{m.from_user.id}`\n**Download Link:** {stream_link}", disable_web_page_preview=True, parse_mode="Markdown", quote=True)
msg_text ="""
<i><u>𝗬𝗼𝘂𝗿 𝗟𝗶𝗻𝗸 𝗚𝗲𝗻𝗲𝗿𝗮𝘁𝗲𝗱 !</u></i>
<b>📂 Fɪʟᴇ ɴᴀᴍᴇ :</b> <i>{}</i>
<b>📦 Fɪʟᴇ ꜱɪᴢᴇ :</b> <i>{}</i>
<b>📥 Dɴʟᴀᴅ :</b> <i>{}</i>
<b>🚸 Nᴛᴇ : Lɪɴᴋ ᴇxᴘɪʀᴇᴅ ɪɴ 24 ʜᴏᴜʀꜱ</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**Dɴʟᴀᴅ ʟɪɴᴋ :** {stream_link}", disable_web_page_preview=True, parse_mode="Markdown", quote=True)
await m.reply_text(
text=msg_text.format(file_name, file_size, stream_link),
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Download Now", url=stream_link)]]),
parse_mode="HTML",
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Dɴʟᴀᴅ ɴᴏᴡ 📥", url=stream_link)]]),
quote=True
)
except FloodWait as e:
@@ -103,7 +116,7 @@ async def channel_receive_handler(bot, broadcast):
message_id=broadcast.message_id,
reply_markup=InlineKeyboardMarkup(
[
[InlineKeyboardButton("Get Direct Download Link", url=f"https://avifilestreambot.herokuapp.com/{str(log_msg.message_id)}")]
[InlineKeyboardButton("Dɴʟᴀᴅ ʟɪɴᴋ 📥", url=f"https://xtreamfile.herokuapp.com/{str(log_msg.message_id)}")]
]
)
)