diff options
author | Kyomotoi <1172294279@qq.com> | 2020-08-14 00:15:21 +0800 |
---|---|---|
committer | Kyomotoi <1172294279@qq.com> | 2020-08-14 00:15:21 +0800 |
commit | 7e9c101127671e702b1d8a3b17c2c68c7980eb8a (patch) | |
tree | 5892c233b709f0e30d468e97602328f96f09889b /ATRI/plugins/check_data.py | |
parent | ac821fa4d0703c0ba2bfbf9890debcc052cda43a (diff) | |
download | ATRI-7e9c101127671e702b1d8a3b17c2c68c7980eb8a.tar.gz ATRI-7e9c101127671e702b1d8a3b17c2c68c7980eb8a.tar.bz2 ATRI-7e9c101127671e702b1d8a3b17c2c68c7980eb8a.zip |
[Update]
Diffstat (limited to 'ATRI/plugins/check_data.py')
-rw-r--r-- | ATRI/plugins/check_data.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/ATRI/plugins/check_data.py b/ATRI/plugins/check_data.py deleted file mode 100644 index 0fd7217..0000000 --- a/ATRI/plugins/check_data.py +++ /dev/null @@ -1,53 +0,0 @@ -import json -import sqlite3 -from pathlib import Path -from nonebot import on_command, CommandSession - - - -@on_command('data_list', aliases = ['数据总量'], only_to_me = False) -async def _(session: CommandSession): - user = session.event.user_id - with open('ATRI/plugins/noobList/noobList.json', 'r') as f: - data = json.load(f) - - if str(user) in data.keys(): - pass - else: - con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db') # setu-normal - cur = con.cursor() - cur.execute("select * from normal") - data_normal = len(cur.fetchall()) - con.close() - - con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'nearR18.db') # setu-nearR18 - cur = con.cursor() - cur.execute("select * from nearR18") - data_nearR18 = len(cur.fetchall()) - con.close() - - con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'r18.db') # setu-r18 - cur = con.cursor() - cur.execute("select * from r18") - data_r18 = len(cur.fetchall()) - con.close() - - con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'cloudmusic' / 'cloudmusic.db') # cloudmusic - cur = con.cursor() - cur.execute("select * from cloudmusic") - data_cloudmusic = len(cur.fetchall()) - con.close() - - with open('ATRI/plugins/wordcloud/wordcloud.json', 'r') as f: - data = json.load(f) - data_repo = len(data) - - await session.send( - f"""目前螃蟹™数据库收录了: -涩图: - normal: {data_normal} - nearR18: {data_nearR18} - r18:{data_r18} -网抑云语录:{data_cloudmusic} -词汇量:{data_repo}""" - )
\ No newline at end of file |