fix lsp keyword search

This commit is contained in:
SiHuan 2020-10-30 10:13:44 +08:00
parent 036034e99d
commit f685397dcd

View file

@ -3,8 +3,11 @@ import requests
from config import LOLIKEYS
class Ans(StdAns):
AllowGroup = [973510746, 805197917,343700338,125733077,1084566280,920863253,798595664,655057127,196268763, 247022495, 474907856, 940333876]
AllowGroup = [973510746, 805197917, 343700338, 125733077, 1084566280,
920863253, 798595664, 655057127, 196268763, 247022495, 474907856, 940333876]
def GETMSG(self):
keys = LOLIKEYS
@ -29,7 +32,7 @@ class Ans(StdAns):
elif code == 3:
msg += '咱没查到,也有可能是Pixiv坏掉惹'
elif code == 0:
if len(self.parms) < 2 or (len(self.parms > 2) and self.parms[2] == 'p'):
if len(self.parms) < 2 or (len(self.parms) > 2 and self.parms[2] == 'p'):
msg += f'[CQ:image,file={picurl}]'
else:
msg += f'[CQ:reply,id={self.mid}]咱帮你🔍{keyword}找到了这个\n{picurl}'
@ -74,4 +77,5 @@ def getsetu(apikey, keyword = ''):
elif resp['code'] == 429:
return 429, 0, ''
else:
# print(resp['code'])
return -2, -1, ''