Skip to content
Prev Previous commit
Next Next commit
Update telegram_instagram.py
  • Loading branch information
New-dev0 authored Oct 5, 2021
commit 2e73434b948773973742dd1a123d6d33b559b889
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Client = Client.start(bot_token=TG_BOT_TOKEN)


# Function/Haner to get Telegram Event Update with Video And Chat Filter.
# Function/Handler to get Telegram Event Update with Video And Chat Filter.
@Client.on(NewMessage(chats=TG_CHATIDS, func=lambda e: e.video))
async def upload_to_insta(event):
msg = await event.reply("Downloading Video...")
Expand All @@ -52,7 +52,7 @@ async def upload_to_insta(event):
m = "Uploaded to Instagram\n"
m += f"https://instagram.com/p/{video.code}"
await msg.edit(m)
os.remove(file) # remove file adter use..
os.remove(file) # remove file after use..


with Client:
Expand Down