Debug if something wrong

This commit is contained in:
yasirarism 2023-09-11 21:30:57 +07:00 committed by GitHub
parent a60a7b4200
commit 965bc2bf5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ async def handle_error(
f_errname = f"crash_{tgl_now.strftime('%d %B %Y')}.txt"
LOGGER.error(traceback.format_exc())
with open(f_errname, "w+", encoding="utf-8") as log:
log.write(traceback.format_exc())
log.write(f"✍️ message: {m.text or m.caption}\n\n{traceback.format_exc()}")
log.close()
if isinstance(m, pyrogram.types.Message):
with contextlib.suppress(Exception):