🚑️ hotfix: pgp error report

This commit is contained in:
xtaodada 2022-07-30 10:31:50 +08:00
parent 57a0a8122a
commit e1660d0dec
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -200,8 +200,8 @@ def listener(**args):
if Config.ERROR_REPORT:
report = f"""# Generated: {strftime('%H:%M %d/%m/%Y', gmtime())}. \n# ChatID: {message.chat.id}. \n# UserID: {message.from_user.id if message.from_user else message.sender_chat.id}. \n# Message: \n-----BEGIN TARGET MESSAGE-----\n{message.text or message.caption}\n-----END TARGET MESSAGE-----\n# Traceback: \n-----BEGIN TRACEBACK-----\n{str(exc_format)}\n-----END TRACEBACK-----\n# Error: "{str(exc_info)}". \n"""
await attach_report(report, f"exception.{time()}.pagermaid", None,
"Error report generated.")
await attach_report(report, f"exception.{time()}.pgp.txt", None,
"PGP Error report generated.")
if (message.chat.id, message.id) in read_context:
del read_context[(message.chat.id, message.id)]
if block_process: