update mysakyta
This commit is contained in:
parent
2425a50d31
commit
df26a0d624
4 changed files with 26 additions and 17 deletions
|
@ -1,14 +1,12 @@
|
|||
import random
|
||||
from zzcore import StdAns
|
||||
from zzcore import StdAns, mysakuya
|
||||
|
||||
class Ans(StdAns):
|
||||
def GETMSG(self):
|
||||
if len(self.parms) < 2:
|
||||
return '不加参数是坏文明!'
|
||||
|
||||
if self.uid != 1318000868:
|
||||
for sakuya in ['口关夜','十六夜咲夜','十六夜','十六','咲夜','Sakuya','sakuya','Izayoi Sakuya','Izayoi','izayoi','izayoi sakuya']:
|
||||
if sakuya in self.raw_msg['message']:
|
||||
if mysakuya(self,self.raw_msg['message']) == False:
|
||||
return "不许你们说咲夜!!"
|
||||
|
||||
r = random.randint(1,3)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from zzcore import StdAns
|
||||
from zzcore import StdAns, mysakuya
|
||||
|
||||
|
||||
class Ans(StdAns):
|
||||
|
@ -11,10 +11,10 @@ class Ans(StdAns):
|
|||
|
||||
def GETMSG(self):
|
||||
if self.parms:
|
||||
if self.uid != 1318000868:
|
||||
for sakuya in ['口关夜','十六夜咲夜','十六夜','十六','咲夜','Sakuya','sakuya','Izayoi Sakuya','Izayoi','izayoi','izayoi sakuya']:
|
||||
if sakuya in self.parms[0]:
|
||||
|
||||
if mysakuya(self, self.parms[0]) == False:
|
||||
return "咲夜是最完美的!!"
|
||||
|
||||
return '咱也不知道' + self.parms[0] + '是啥呢~'
|
||||
else:
|
||||
return '汝再调戏咱,咱可就生气了!!'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from zzcore import StdAns
|
||||
from zzcore import StdAns, mysakuya
|
||||
import requests
|
||||
|
||||
from config import LOLIKEY
|
||||
|
@ -23,10 +23,10 @@ class Ans(StdAns):
|
|||
|
||||
else:
|
||||
keyword = self.raw_msg['message'][7:]
|
||||
if self.uid != 1318000868:
|
||||
for sakuya in ['口关夜','十六夜咲夜','十六夜','十六','咲夜','Sakuya','sakuya','Izayoi Sakuya','Izayoi','izayoi','izayoi sakuya']:
|
||||
if sakuya in keyword:
|
||||
|
||||
if mysakuya(self, keyword) == False:
|
||||
return "不许你们看咲夜的涩图!!"
|
||||
|
||||
params['keyword'] = keyword
|
||||
try:
|
||||
resp = requests.get(url=url,params=params).json()
|
||||
|
|
11
zzcore.py
11
zzcore.py
|
@ -62,3 +62,14 @@ class StdAns():
|
|||
'message_id' : msgid,
|
||||
}
|
||||
requests.post(url = url, data = json.dumps(data),headers = Headers)
|
||||
|
||||
|
||||
def mysakuya(self, words):
|
||||
if self.uid == 1318000868:
|
||||
return True
|
||||
|
||||
if ('咲' in words and '夜' in words) or ('口关' in words and '夜' in words) or ('十' in words and '六' in words and '夜' in words) or ('1' in words and '6' in words and '夜' in words):
|
||||
return False
|
||||
for sakuya in ['口关夜','十六夜咲夜','十六夜','十六','咲夜','Sakuya','sakuya','Izayoi Sakuya','Izayoi','izayoi','izayoi sakuya']:
|
||||
if sakuya in words:
|
||||
return False
|
Loading…
Reference in a new issue