mirror of
https://github.com/avipatilpro/FileStreamBot.git
synced 2026-01-15 14:22:53 -03:00
Updated 2.0.3
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
# Byte-compiled / optimized / DLL file
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
@@ -114,4 +114,4 @@ dmypy.json
|
||||
.pyre/
|
||||
|
||||
#session files
|
||||
*.session
|
||||
*.session
|
||||
|
||||
@@ -9,6 +9,76 @@ from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
||||
from pyrogram.errors import UserNotParticipant
|
||||
db = Database(Var.DATABASE_URL, Var.SESSION_NAME)
|
||||
|
||||
START_TEXT = """
|
||||
<i>👋 Hᴇʏ,</i>{}\n
|
||||
<i>I'ᴍ Tᴇʟᴇɢʀᴀᴍ Fɪʟᴇs Sᴛʀᴇᴀᴍɪɴɢ Bᴏᴛ ᴀs ᴡᴇʟʟ Dɪʀᴇᴄᴛ Lɪɴᴋs Gᴇɴᴇʀᴀᴛᴇ</i>\n
|
||||
<i>Cʟɪᴄᴋ ᴏɴ Hᴇʟᴘ ᴛᴏ ɢᴇᴛ ᴍᴏʀᴇ ɪɴғᴏʀᴍᴀᴛɪᴏɴ</i>\n
|
||||
<i><u>𝗪𝗔𝗥𝗡𝗜𝗡𝗚 🚸</u></i>
|
||||
<b>🔞 Pʀᴏɴ ᴄᴏɴᴛᴇɴᴛꜱ ʟᴇᴀᴅꜱ ᴛᴏ ᴘᴇʀᴍᴀɴᴇɴᴛ ʙᴀɴ ʏᴏᴜ.</b>\n\n
|
||||
<i><b>🍃 Bᴏᴛ Mᴀɪɴᴛᴀɪɴᴇᴅ Bʏ :</b>@AvishkarPatil</i>"""
|
||||
|
||||
HELP_TEXT = """
|
||||
<i>- Sᴇɴᴅ ᴍᴇ ᴀɴʏ ꜰɪʟᴇ (ᴏʀ) ᴍᴇᴅɪᴀ ꜰʀᴏᴍ ᴛᴇʟᴇɢʀᴀᴍ.</i>
|
||||
<i>- I ᴡɪʟʟ ᴘʀᴏᴠɪᴅᴇ ᴇxᴛᴇʀɴᴀʟ ᴅɪʀᴇᴄᴛ ᴅᴏᴡɴʟᴏᴀᴅ ʟɪɴᴋ !.</i>
|
||||
<i>- Aᴅᴅ Mᴇ ɪɴ ʏᴏᴜʀ Cʜᴀɴɴᴇʟ Fᴏʀ Dɪʀᴇᴄᴛ Dᴏᴡɴʟᴏᴀᴅ Lɪɴᴋs Bᴜᴛᴛᴏɴ</i>
|
||||
<i>- Tʜɪs Pᴇʀᴍᴇᴀɴᴛ Lɪɴᴋ Wɪᴛʜ Fᴀsᴛᴇsᴛ Sᴘᴇᴇᴅ</i>\n
|
||||
<u>🔸 𝗪𝗔𝗥𝗡𝗜𝗡𝗚 🚸</u>\n
|
||||
<b>🔞 Pʀᴏɴ ᴄᴏɴᴛᴇɴᴛꜱ ʟᴇᴀᴅꜱ ᴛᴏ ᴘᴇʀᴍᴀɴᴇɴᴛ ʙᴀɴ ʏᴏᴜ.</b>\n
|
||||
<i>Cᴏɴᴛᴀᴄᴛ ᴅᴇᴠᴇʟᴏᴘᴇʀ (ᴏʀ) ʀᴇᴘᴏʀᴛ ʙᴜɢꜱ</i> <b>: <a href='https://t.me/Avishkarpatil'>[ ᴄʟɪᴄᴋ ʜᴇʀᴇ ]</a></b>"""
|
||||
|
||||
ABOUT_TEXT = """
|
||||
<b>⚜ Mʏ ɴᴀᴍᴇ : FileStreamX</b>\n
|
||||
<b>🔸Vᴇʀꜱɪᴏɴ : <a href='https://telegram.me/AvishkarPatil'>3.0.1</a></b>\n
|
||||
<b>🔹Sᴏᴜʀᴄᴇ : <a href='https://github.com/FileStreamBot'>Cʟɪᴄᴋ Hᴇʀᴇ</a></b>\n
|
||||
<b>🔸GitHub : <a href='https://GitHub.com/avipatilpro'>Fᴏʟʟᴏᴡ</a></b>\n
|
||||
<b>🔹Dᴇᴠᴇʟᴏᴘᴇʀ : <a href='https://telegram.me/Avishkarpatil'>Aᴠɪsʜᴋᴀʀ Pᴀᴛɪʟ</a></b>\n
|
||||
<b>🔸Lᴀꜱᴛ ᴜᴘᴅᴀᴛᴇᴅ : <a href='https://telegram.me/AvishkarPatil'>[ 01-02-21 ] 05:05 PM</a></b>"""
|
||||
|
||||
START_BUTTONS = InlineKeyboardMarkup(
|
||||
[[
|
||||
InlineKeyboardButton('Hᴇʟᴘ', callback_data='help'),
|
||||
InlineKeyboardButton('Aʙᴏᴜᴛ', callback_data='about'),
|
||||
InlineKeyboardButton('Cʟᴏsᴇ', callback_data='close')
|
||||
]]
|
||||
)
|
||||
HELP_BUTTONS = InlineKeyboardMarkup(
|
||||
[[
|
||||
InlineKeyboardButton('Hᴏᴍᴇ', callback_data='home'),
|
||||
InlineKeyboardButton('Aʙᴏᴜᴛ', callback_data='about'),
|
||||
InlineKeyboardButton('Cʟᴏsᴇ', callback_data='close')
|
||||
]]
|
||||
)
|
||||
ABOUT_BUTTONS = InlineKeyboardMarkup(
|
||||
[[
|
||||
InlineKeyboardButton('Hᴏᴍᴇ', callback_data='home'),
|
||||
InlineKeyboardButton('Hᴇʟᴘ', callback_data='help'),
|
||||
InlineKeyboardButton('Cʟᴏsᴇ', callback_data='close')
|
||||
]]
|
||||
)
|
||||
|
||||
@StreamBot.on_callback_query()
|
||||
async def cb_data(bot, update):
|
||||
if update.data == "home":
|
||||
await update.message.edit_text(
|
||||
text=START_TEXT.format(update.from_user.mention),
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=START_BUTTONS
|
||||
)
|
||||
elif update.data == "help":
|
||||
await update.message.edit_text(
|
||||
text=HELP_TEXT,
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=HELP_BUTTONS
|
||||
)
|
||||
elif update.data == "about":
|
||||
await update.message.edit_text(
|
||||
text=ABOUT_TEXT,
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=ABOUT_BUTTONS
|
||||
)
|
||||
else:
|
||||
await update.message.delete()
|
||||
|
||||
|
||||
@StreamBot.on_message(filters.command('start') & filters.private & ~filters.edited)
|
||||
async def start(b, m):
|
||||
@@ -36,11 +106,9 @@ async def start(b, m):
|
||||
chat_id=m.chat.id,
|
||||
text="<i>Jᴏɪɴ ᴍʏ ᴜᴘᴅᴀᴛᴇ ᴄʜᴀɴɴᴇʟ ᴛᴏ ᴜsᴇ ᴍᴇ 🔐</i>",
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton("Jᴏɪɴ ɴᴏᴡ 🔓", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]
|
||||
]
|
||||
[[
|
||||
InlineKeyboardButton("Jᴏɪɴ ɴᴏᴡ 🔓", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]]
|
||||
),
|
||||
parse_mode="HTML"
|
||||
)
|
||||
@@ -53,17 +121,11 @@ async def start(b, m):
|
||||
disable_web_page_preview=True)
|
||||
return
|
||||
await m.reply_text(
|
||||
text="""
|
||||
<i>👋 Hᴇʏ, ʜɪꜱ ɪꜱ ꜰɪʟᴇ ᴛᴏ ʟɪɴᴋ ɢᴇɴ ʙᴏᴛ</i>\n
|
||||
<i>Cʟɪᴄᴋ ᴏɴ /help ᴛᴏ ɢᴇᴛ ᴍᴏʀᴇ ɪɴғᴏʀᴍᴀᴛɪᴏɴ</i>\n
|
||||
<i><b>🍃 Bᴏᴛ Mᴀɪɴᴛᴀɪɴᴇᴅ Bʏ :</b>@AvishkarPatil</i>\n\n
|
||||
<i><u>𝗪𝗔𝗥𝗡𝗜𝗡𝗚 🚸</u></i>\n
|
||||
<b>🔞 Pʀᴏɴ ᴄᴏɴᴛᴇɴᴛꜱ ʟᴇᴀᴅꜱ ᴛᴏ ᴘᴇʀᴍᴀɴᴇɴᴛ ʙᴀɴ ʏᴏᴜ.</b>""",
|
||||
text=START_TEXT.format(m.from_user.mention),
|
||||
parse_mode="HTML",
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=InlineKeyboardMarkup( [ [InlineKeyboardButton('My Father 🍂', url='https://t.me/Avishkarpatil'),
|
||||
InlineKeyboardButton('Follow 🍺', url='https://Instagram.com/proavipatil') ] ] ) )
|
||||
|
||||
reply_markup=START_BUTTONS
|
||||
)
|
||||
|
||||
|
||||
else:
|
||||
@@ -83,15 +145,9 @@ async def start(b, m):
|
||||
chat_id=m.chat.id,
|
||||
text="**Pʟᴇᴀsᴇ Jᴏɪɴ Mʏ Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ ᴛᴏ ᴜsᴇ ᴛʜɪs Bᴏᴛ**!\n\n**Dᴜᴇ ᴛᴏ Oᴠᴇʀʟᴏᴀᴅ, Oɴʟʏ Cʜᴀɴɴᴇʟ Sᴜʙsᴄʀɪʙᴇʀs ᴄᴀɴ ᴜsᴇ ᴛʜᴇ Bᴏᴛ**!",
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton("🤖 Join Updates Channel", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton("🔄 Refresh / Try Again",
|
||||
url=f"https://t.me/F2LxBot.herokuapp.com/{usr_cmd}") # Chnage ur app name
|
||||
]
|
||||
]
|
||||
[[
|
||||
InlineKeyboardButton("🤖 Jᴏɪɴ Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]]
|
||||
),
|
||||
parse_mode="markdown"
|
||||
)
|
||||
@@ -129,17 +185,11 @@ async def start(b, m):
|
||||
|
||||
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>
|
||||
|
||||
<i>🍃 Bᴏᴛ Mᴀɪɴᴛᴀɪɴᴇᴅ Bʏ :</i> <b>@AvishkarPatil</b>
|
||||
|
||||
"""
|
||||
|
||||
await m.reply_text(
|
||||
@@ -149,6 +199,15 @@ async def start(b, m):
|
||||
)
|
||||
|
||||
|
||||
@StreamBot.on_message(filters.private & filters.command(["about"]))
|
||||
async def start(bot, update):
|
||||
await update.reply_text(
|
||||
text=ABOUT_TEXT.format(update.from_user.mention),
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=ABOUT_BUTTONS
|
||||
)
|
||||
|
||||
|
||||
@StreamBot.on_message(filters.command('help') & filters.private & ~filters.edited)
|
||||
async def help_handler(bot, message):
|
||||
if not await db.is_user_exist(message.from_user.id):
|
||||
@@ -173,11 +232,9 @@ async def help_handler(bot, message):
|
||||
chat_id=message.chat.id,
|
||||
text="**Pʟᴇᴀsᴇ Jᴏɪɴ Mʏ Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ ᴛᴏ ᴜsᴇ ᴛʜɪs Bᴏᴛ!**\n\n__Dᴜᴇ ᴛᴏ Oᴠᴇʀʟᴏᴀᴅ, Oɴʟʏ Cʜᴀɴɴᴇʟ Sᴜʙsᴄʀɪʙᴇʀs ᴄᴀɴ ᴜsᴇ ᴛʜᴇ Bᴏᴛ!__",
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton("🤖 Jᴏɪɴ Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]
|
||||
]
|
||||
[[
|
||||
InlineKeyboardButton("🤖 Jᴏɪɴ Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]]
|
||||
),
|
||||
parse_mode="markdown"
|
||||
)
|
||||
@@ -190,18 +247,8 @@ async def help_handler(bot, message):
|
||||
disable_web_page_preview=True)
|
||||
return
|
||||
await message.reply_text(
|
||||
text="""
|
||||
<i>Sᴇɴᴅ ᴍᴇ ᴀɴʏ ꜰɪʟᴇ (ᴏʀ) ᴍᴇᴅɪᴀ ꜰʀᴏᴍ ᴛᴇʟᴇɢʀᴀᴍ.</i>\n
|
||||
<i>I ᴡɪʟʟ ᴘʀᴏᴠɪᴅᴇ ᴇxᴛᴇʀɴᴀʟ ᴅɪʀᴇᴄᴛ ᴅᴏᴡɴʟᴏᴀᴅ ʟɪɴᴋ !.</i>\n
|
||||
<u>𝗪𝗔𝗥𝗡𝗜𝗡𝗚 🚸</u>\n
|
||||
<b>Pʀᴏɴ ᴄᴏɴᴛᴇɴᴛꜱ ʟᴇᴀᴅꜱ ᴛᴏ ᴘᴇʀᴍᴀɴᴇɴᴛ ʙᴀɴ ʏᴏᴜ.</b>\n
|
||||
<i>Cᴏɴᴛᴀᴄᴛ ᴅᴇᴠᴇʟᴏᴘᴇʀ (ᴏʀ) ʀᴇᴘᴏʀᴛ ʙᴜɢꜱ</i> <b>: <a href='https://t.me/Avishkarpatil'>[ ᴄʟɪᴄᴋ ʜᴇʀᴇ ]</a></b>""",
|
||||
text=HELP_BUTTONS,
|
||||
parse_mode="HTML",
|
||||
disable_web_page_preview=True,
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[InlineKeyboardButton("🏵 DEV", url="https://GitHub.com/avipatilpro")],
|
||||
[InlineKeyboardButton("🍺 FOLLOW", url="https://Instagram.com/proavipatil")]
|
||||
]
|
||||
reply_markup=HELP_BUTTONS
|
||||
)
|
||||
)
|
||||
|
||||
@@ -36,11 +36,7 @@ async def private_receive_handler(c: Client, m: Message):
|
||||
chat_id=m.chat.id,
|
||||
text="""<i>Jᴏɪɴ ᴍʏ ᴜᴘᴅᴀᴛᴇ ᴄʜᴀɴɴᴇʟ ᴛᴏ ᴜꜱᴇ ᴍᴇ 🔐</i>""",
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton("Jᴏɪɴ ɴᴏᴡ 🔓", url=f"https://t.me/{Var.UPDATES_CHANNEL}")
|
||||
]
|
||||
]
|
||||
[[ InlineKeyboardButton("Jᴏɪɴ ɴᴏᴡ 🔓", url=f"https://t.me/{Var.UPDATES_CHANNEL}") ]]
|
||||
),
|
||||
parse_mode="HTML"
|
||||
)
|
||||
@@ -76,15 +72,10 @@ async def private_receive_handler(c: Client, m: Message):
|
||||
|
||||
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>
|
||||
|
||||
<i>© @AvishkarPatil </i>"""
|
||||
|
||||
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)
|
||||
@@ -121,10 +112,7 @@ async def channel_receive_handler(bot, broadcast):
|
||||
chat_id=broadcast.chat.id,
|
||||
message_id=broadcast.message_id,
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[InlineKeyboardButton("Dᴏᴡɴʟᴏᴀᴅ ʟɪɴᴋ 📥", url=stream_link)]
|
||||
]
|
||||
)
|
||||
[[InlineKeyboardButton("Dᴏᴡɴʟᴏᴀᴅ ʟɪɴᴋ 📥", url=stream_link)]])
|
||||
)
|
||||
except FloodWait as w:
|
||||
print(f"Sleeping for {str(w.x)}s")
|
||||
|
||||
Reference in New Issue
Block a user