Fix if link not start with http

This commit is contained in:
yasirarism 2022-12-16 09:46:07 +07:00 committed by GitHub
parent a3efe8d991
commit 45b9fb1c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ __HELP__ = """
async def take_ss(_, message):
if len(message.command) == 1:
return await message.reply("Give A Url To Fetch Screenshot.")
url = message.command[1]
url = message.command[1] if message.command[1].startswith("http") else f"https://{message.command[1]}"
filename = f"imageToSave_{message.from_user.id}.png"
m = await message.reply("Capturing screenshot...")
try: