添加 try 防止不停报错

This commit is contained in:
c3b2a 2021-02-07 13:41:50 +08:00 committed by GitHub
parent a4ecd00199
commit c58f7f00fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -618,6 +618,7 @@ async def auto_reply(context):
return
chat_id = context.chat_id
sender_id = context.sender_id
try:
if context.id not in read_context:
plain_dict = get_redis(f"keyword.{chat_id}.plain")
regex_dict = get_redis(f"keyword.{chat_id}.regex")
@ -673,3 +674,5 @@ async def auto_reply(context):
await send_reply(chat_id, parse_multi(v), context)
else:
del read_context[context.id]
except:
pass