fix LOGGING is not definied and better to use lazy formatting (#299)

Signed-off-by: Furry Chemistry <84753790+aryazakaria01@users.noreply.github.com>
This commit is contained in:
Furry Chemistry 2024-06-30 18:07:03 +07:00 committed by GitHub
parent 07a06ce14d
commit 79745cb2d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -261,7 +261,7 @@ async def twitterdl(_, message):
path = obj.get_dest() path = obj.get_dest()
await message.reply_video(path, caption=f"<code>{fname}</code>\n\nUploaded for {message.from_user.mention} [<code>{message.from_user.id}</code>]",) await message.reply_video(path, caption=f"<code>{fname}</code>\n\nUploaded for {message.from_user.mention} [<code>{message.from_user.id}</code>]",)
except Exception as er: except Exception as er:
LOGGING.error(f"ERROR: while fetching TwitterDL. {er}") LOGGER.error("ERROR: while fetching TwitterDL. %s", er)
return await msg.edit_msg("ERROR: Got error while extracting link.") return await msg.edit_msg("ERROR: Got error while extracting link.")
await msg.delete() await msg.delete()
except Exception as e: except Exception as e: