Minor Changes

This commit is contained in:
Avi Patil
2024-01-06 15:16:14 +05:30
parent 61b7dac2b7
commit 7b35887bc3
18 changed files with 306 additions and 285 deletions

View File

@@ -20,12 +20,20 @@ async def start(bot: Client, message: Message):
usr_cmd = message.text.split("_")[-1]
if usr_cmd == "/start":
await message.reply_text(
text=LANG.START_TEXT.format(message.from_user.mention, FileStream.username),
parse_mode=ParseMode.HTML,
disable_web_page_preview=True,
reply_markup=BUTTON.START_BUTTONS
)
if Telegram.START_PIC:
await message.reply_photo(
photo=Telegram.START_PIC,
caption=LANG.START_TEXT.format(message.from_user.mention, FileStream.username),
parse_mode=ParseMode.HTML,
reply_markup=BUTTON.START_BUTTONS
)
else:
await message.reply_text(
text=LANG.START_TEXT.format(message.from_user.mention, FileStream.username),
parse_mode=ParseMode.HTML,
disable_web_page_preview=True,
reply_markup=BUTTON.START_BUTTONS
)
else:
if "stream_" in message.text:
try:
@@ -70,23 +78,38 @@ async def start(bot: Client, message: Message):
async def start(bot, message):
if not await verify_user(bot, message):
return
await message.reply_text(
text=LANG.ABOUT_TEXT.format(FileStream.fname, __version__),
disable_web_page_preview=True,
reply_markup=BUTTON.ABOUT_BUTTONS
)
if Telegram.START_PIC:
await message.reply_photo(
photo=Telegram.START_PIC,
caption=LANG.ABOUT_TEXT.format(FileStream.fname, __version__),
parse_mode=ParseMode.HTML,
reply_markup=BUTTON.ABOUT_BUTTONS
)
else:
await message.reply_text(
text=LANG.ABOUT_TEXT.format(FileStream.fname, __version__),
disable_web_page_preview=True,
reply_markup=BUTTON.ABOUT_BUTTONS
)
@FileStream.on_message((filters.command('help')) & filters.private)
async def help_handler(bot, message):
if not await verify_user(bot, message):
return
await message.reply_text(
text=LANG.HELP_TEXT.format(Telegram.OWNER_ID),
parse_mode=ParseMode.HTML,
disable_web_page_preview=True,
reply_markup=BUTTON.HELP_BUTTONS
)
if Telegram.START_PIC:
await message.reply_photo(
photo=Telegram.START_PIC,
caption=LANG.HELP_TEXT.format(Telegram.OWNER_ID),
parse_mode=ParseMode.HTML,
reply_markup=BUTTON.HELP_BUTTONS
)
else:
await message.reply_text(
text=LANG.HELP_TEXT.format(Telegram.OWNER_ID),
parse_mode=ParseMode.HTML,
disable_web_page_preview=True,
reply_markup=BUTTON.HELP_BUTTONS
)
# ---------------------------------------------------------------------------------------------------
@@ -112,7 +135,7 @@ async def my_files(bot: Client, message: Message):
[InlineKeyboardButton("ᴇᴍᴘᴛʏ", callback_data="N/A")],
)
file_list.append([InlineKeyboardButton("ʟsᴇ", callback_data="close")])
await message.reply_photo(photo=Telegram.IMAGE_FILEID,
await message.reply_photo(photo=Telegram.FILE_PIC,
caption="Total files: {}".format(total_files),
reply_markup=InlineKeyboardMarkup(file_list))