update 谁先死

This commit is contained in:
SiHuan 2020-08-03 23:17:56 +08:00
parent fd29e8808f
commit 8cd2f32624

View file

@ -1,14 +1,23 @@
from worker import emmm
from zzcore import DM
from config import DAAPI
def ZZRouter(data):
if ('[CQ:image,file=a854b2390d427b02fc26cae49d508a75.image]' in data['raw_message'] or '[CQ:image,file=6a507d12d1542cbed37af4776a1cd066.image]' in data['raw_message']) and data['user_id'] != 1318000868:
DM(data['message_id'])
if data['post_type'] != 'message' or data['message_type'] != 'group' or data['message'][0] != '/':
if len(data['raw_message']) == 54 and data['raw_message'][:15] == '[CQ:image,file=': # use re
url = data['message'][58:][:-1]
r = requests.post(
"https://api.deepai.org/api/image-similarity",
data={
'image1': 'https://img.vim-cn.com/fa/4a7f3996e3601e98bd3c1b245fcb88e05f32ec.jpg',
'image2': url,
},
headers={'api-key': DAAPI}
)
if r.json()['output']['distance'] < 10:
DM(data['message_id'])
return
uid = data['user_id']