🐛 修复 block bot 后的报错问题 (#55)

This commit is contained in:
Xtao_dada 2021-04-04 09:13:29 +08:00 committed by GitHub
parent 52edcc8a73
commit c9a5f218f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,7 @@ async def attach_report(plaintext, file_name, reply_id=None, caption=None):
caption=caption
)
except:
try:
async with bot.conversation('PagerMaid_Modify_bot') as conversation:
await conversation.send_message('/ping')
await conversation.get_response()
@ -83,6 +84,8 @@ async def attach_report(plaintext, file_name, reply_id=None, caption=None):
reply_to=reply_id,
caption=caption
)
except:
pass
remove(file_name)
async def obtain_message(context):