Initial Commit

This commit is contained in:
Avishkar Patil
2021-07-01 15:56:52 +05:30
committed by GitHub
parent eebd814931
commit 8d41cf0480

View File

@@ -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('', callback_data='about'),
InlineKeyboardButton('sᴇ', callback_data='close')
]]
)
HELP_BUTTONS = InlineKeyboardMarkup(
[[
InlineKeyboardButton('Hᴍᴇ', callback_data='home'),
InlineKeyboardButton('', callback_data='about'),
InlineKeyboardButton('sᴇ', callback_data='close')
]]
)
ABOUT_BUTTONS = InlineKeyboardMarkup(
[[
InlineKeyboardButton('Hᴍᴇ', callback_data='home'),
InlineKeyboardButton('Hᴇʟᴘ', callback_data='help'),
InlineKeyboardButton('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
)
)