用 try 修复信息删除后再 delete 造成的报错

This commit is contained in:
c3b2a 2021-02-03 08:53:20 +08:00 committed by GitHub
parent c260326e28
commit c2182181da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,10 @@ def get_rule(chat_id, rule_type, rule_index):
async def del_msg(context, t_lim):
await asyncio.sleep(t_lim)
await context.delete()
try:
await context.delete()
except:
pass
async def send_reply(chat_id, reply_msg, context):
chat = context.chat