Skip to content

Commit

Permalink
Update save_media.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AbirHasan2005 authored Aug 5, 2022
1 parent c921d9f commit 197db7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/save_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def save_batch_media_in_channel(bot: Client, editable: Message, message_id
sent_message = await forward_to_channel(bot, message, editable)
if sent_message is None:
continue
message_ids_str += f"{str(sent_message.message_id)} "
message_ids_str += f"{str(sent_message.id)} "
await asyncio.sleep(2)
SaveMessage = await bot.send_message(
chat_id=Config.DB_CHANNEL,
Expand All @@ -49,7 +49,7 @@ async def save_batch_media_in_channel(bot: Client, editable: Message, message_id
InlineKeyboardButton("Delete Batch", callback_data="closeMessage")
]])
)
share_link = f"https://t.me/{Config.BOT_USERNAME}?start=AbirHasan2005_{str_to_b64(str(SaveMessage.message_id))}"
share_link = f"https://t.me/{Config.BOT_USERNAME}?start=AbirHasan2005_{str_to_b64(str(SaveMessage.id))}"
await editable.edit(
f"**Batch Files Stored in my Database!**\n\nHere is the Permanent Link of your files: {share_link} \n\n"
f"Just Click the link to get your files!",
Expand Down Expand Up @@ -83,7 +83,7 @@ async def save_batch_media_in_channel(bot: Client, editable: Message, message_id
async def save_media_in_channel(bot: Client, editable: Message, message: Message):
try:
forwarded_msg = await message.forward(Config.DB_CHANNEL)
file_er_id = str(forwarded_msg.message_id)
file_er_id = str(forwarded_msg.id)
await forwarded_msg.reply_text(
f"#PRIVATE_FILE:\n\n[{message.from_user.first_name}](tg://user?id={message.from_user.id}) Got File Link!",
disable_web_page_preview=True)
Expand Down

0 comments on commit 197db7c

Please sign in to comment.