From ead17a421850e2fa01a9491c2ad16939821e8f87 Mon Sep 17 00:00:00 2001 From: "2920233418@qq.com" <2920233418@qq.com> Date: Sun, 16 Aug 2020 19:11:44 +0800 Subject: [PATCH] new --- .gitignore | 3 ++- route.py | 3 +-- zzcore.py | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 69ed991..2e3c5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ env __pycache__ .vscode config.py -.idea \ No newline at end of file +.idea +test.py \ No newline at end of file diff --git a/route.py b/route.py index 71ad234..cd1f13e 100644 --- a/route.py +++ b/route.py @@ -9,8 +9,7 @@ def ZZRouter(data): gid = data['group_id'] role = data['sender']['role'] parms = str.split(data['message'][1:]) - nickname = data['sender']['nickname'] - print(uid, gid, role, parms, nickname) + print(uid, gid, role, parms) if parms == []: parms[0] = 'help' worker = parms[0] diff --git a/zzcore.py b/zzcore.py index af1da0b..a00dc6d 100644 --- a/zzcore.py +++ b/zzcore.py @@ -1,8 +1,8 @@ -import requests, json, redis +import requests, json#, redis from config import APIURL, ALLWORKERS, AUTHORIZATION from worker import emmm -pool = redis.ConnectionPool(host='127.0.0.1', port=6379, decode_responses=True) -r = redis.Redis(connection_pool=pool) +# pool = redis.ConnectionPool(host='127.0.0.1', port=6379, decode_responses=True) +# r = redis.Redis(connection_pool=pool) class StdAns(): AllowGroup = [] @@ -12,13 +12,12 @@ class StdAns(): UserNotAllow = '汝不被允许呢.' RoleNotAllow = '汝的角色不被允许哦.' - def __init__(self,parms,uid,gid,role,raw_msg,nickname): + def __init__(self,parms,uid,gid,role,raw_msg): self.parms = parms self.uid = uid self.gid = gid self.role = role self.raw_msg = raw_msg - self.nickname = nickname def DATAGET(self): return r.hgetall(self.parms[0])