mirror of
https://github.com/avipatilpro/FileStreamBot.git
synced 2026-01-15 22:32:53 -03:00
Initial Commit
This commit is contained in:
@@ -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)}")]
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user