防止 vps 没有安装 redis-server 造成的报错

This commit is contained in:
c3b2a 2021-01-20 16:35:15 +08:00 committed by GitHub
parent 08e6537d4a
commit cce2af8f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,6 +340,8 @@ async def reply_set(context):
@listener(incoming=True, ignore_edited=True)
async def auto_reply(context):
if not redis_status():
return
global msg_rate, last_time
chat_id = context.chat_id
sender_id = context.sender_id