diff options
author | Kyomotoi <[email protected]> | 2020-08-12 22:38:05 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-08-12 22:38:05 +0800 |
commit | de591789f5ab68458d060d6ea96bf8dcbbe4df8c (patch) | |
tree | 144f083ad7a807b08fc4e269f966478e7e1ed33e /ATRI/plugins/setu.py | |
parent | b11b204043451334c33d827b776f230b6c8e84ce (diff) | |
download | ATRI-de591789f5ab68458d060d6ea96bf8dcbbe4df8c.tar.gz ATRI-de591789f5ab68458d060d6ea96bf8dcbbe4df8c.tar.bz2 ATRI-de591789f5ab68458d060d6ea96bf8dcbbe4df8c.zip |
[Fix] f**k some ntr
Diffstat (limited to 'ATRI/plugins/setu.py')
-rw-r--r-- | ATRI/plugins/setu.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/ATRI/plugins/setu.py b/ATRI/plugins/setu.py index 70ef0b4..03a5cf2 100644 --- a/ATRI/plugins/setu.py +++ b/ATRI/plugins/setu.py @@ -4,11 +4,8 @@ import time import json from random import choice, randint from pathlib import Path -import aiocqhttp import nonebot -from nonebot import NoneBot, on_command, CommandSession -from nonebot import message_preprocessor -from nonebot.plugin import PluginManager +from nonebot import on_command, CommandSession import config # type: ignore from ATRI.modules import response # type: ignore @@ -32,15 +29,14 @@ async def setu(session: CommandSession): group = session.event.group_id user = session.event.user_id with open('ATRI/plugins/noobList/noobList.json', 'r') as f: - data = json.load(f) + data0 = json.load(f) + with open(Path('.') / 'ATRI' / 'plugins' / 'switch' / 'switch.json', 'r') as f: + data1 = json.load(f) - if data[f"{user}"] == str(user): + if str(user) in data0.keys(): pass else: - with open(Path('.') / 'ATRI' / 'plugins' / 'switch' / 'switch.json', 'r') as f: - data = json.load(f) - - if data["setu"] == 0: + if data1["setu"] == 0: await session.send('别急!正在找图!') start = time.perf_counter() values = { |