From 7a1908b7f13b4d0801a4079da3455d44c7d1077f Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 24 Dec 2021 22:52:54 +0800 Subject: [PATCH] [fix] vip IndexError --- list.json | 2 +- vip.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/list.json b/list.json index eaff241..99c275a 100644 --- a/list.json +++ b/list.json @@ -322,7 +322,7 @@ }, { "name": "vip", - "version": "0.712", + "version": "0.713", "section": "chat", "maintainer": "xtaodada", "size": "11.6 kb", diff --git a/vip.py b/vip.py index d5ed13a..66bf848 100644 --- a/vip.py +++ b/vip.py @@ -137,7 +137,7 @@ async def pixiv(context): except ValueError: await context.edit('镜像源序号错误。') return - if 0 < num < 4: + if 0 < num < 3: try: redis.set("pixiv_num", num) except ConnectionError: @@ -151,14 +151,14 @@ async def pixiv(context): else: pass if not redis_status(): - num = 3 + num = 2 else: try: num = int(redis.get("pixiv_num").decode()) except AttributeError: - num = 3 + num = 2 except ConnectionError: - num = 3 + num = 2 try: message = await obtain_message(context) except ValueError: