mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 08:27:38 +00:00
[fix] vip IndexError
This commit is contained in:
parent
02281473a7
commit
7a1908b7f1
@ -322,7 +322,7 @@
|
||||
},
|
||||
{
|
||||
"name": "vip",
|
||||
"version": "0.712",
|
||||
"version": "0.713",
|
||||
"section": "chat",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "11.6 kb",
|
||||
|
8
vip.py
8
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:
|
||||
|
Loading…
Reference in New Issue
Block a user