summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ATRI/plugins/Chat0.py10
-rw-r--r--ATRI/plugins/UploadSqlite.py36
2 files changed, 40 insertions, 6 deletions
diff --git a/ATRI/plugins/Chat0.py b/ATRI/plugins/Chat0.py
index c3be56b..36e5865 100644
--- a/ATRI/plugins/Chat0.py
+++ b/ATRI/plugins/Chat0.py
@@ -530,7 +530,7 @@ async def _(session: CommandSession):
if 0 <= now_time() < 5.5:
pass
else:
- if datetime.date.today().strftime('%y%m%d') == 200828:
+ if datetime.date.today().strftime('%y%m%d') == '200828':
res = randint(1,3)
if res == 1:
msg = choice(
@@ -657,10 +657,7 @@ async def _(session: CommandSession):
bL = {}
pattern = r"[nNηиɴИ][tT][rR]|[牛🐂]头人"
if re.findall(pattern, msg):
- await session.send('你妈的,牛头人,' + request_api(KC_URL))
noobList1.append(user)
- print(noobList1)
- print(countX(noobList1, user))
if countX(noobList1, user) == 5:
if user == master:
await session.send('是主人的话...那算了...呜呜\n即使到达了ATRI的最低忍耐限度......')
@@ -686,4 +683,7 @@ async def _(session: CommandSession):
trigger = trigger,
args = (session.event.user_id,),
misfire_grace_time = 60,
- ) \ No newline at end of file
+ )
+
+ else:
+ await session.send('你妈的,牛头人,' + request_api(KC_URL)) \ No newline at end of file
diff --git a/ATRI/plugins/UploadSqlite.py b/ATRI/plugins/UploadSqlite.py
index 6488ed4..ffd2ecc 100644
--- a/ATRI/plugins/UploadSqlite.py
+++ b/ATRI/plugins/UploadSqlite.py
@@ -7,7 +7,6 @@ import nonebot
from pathlib import Path
from nonebot import on_command, CommandSession
-from nonebot import session
from ATRI.modules import response # type: ignore
@@ -158,6 +157,41 @@ async def _(session: CommandSession):
await session.send(f'数据上传完成!\n耗时: {round(end - start, 3)}s')
+# @on_command('del_setu', aliases = ['删除涩图'], only_to_me = False)
+# async def _(session: CommandSession):
+# user = session.event.user_id
+# if user in master or user in sepi:
+# start = time.perf_counter()
+# msg = session.event.raw_message.split(' ', 2)
+# print(msg)
+# i_tpye = msg[1]
+# pid = msg[2]
+
+# if i_tpye == '正常':
+# if os.path.exists(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db'):
+# print('数据文件存在!')
+# else:
+# session.finish('ERROR: 恁都没库删锤子')
+# con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db')
+# cur = con.cursor()
+# cur.execute(f'DELETE FROM COMPANY WHERE ID = {pid}')
+# con.commit()
+# con.close()
+
+# elif i_tpye == '擦边球':
+# if os.path.exists(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db'):
+# print('数据文件存在!')
+# else:
+# session.finish('ERROR: 恁都没库删锤子')
+
+
+# elif i_tpye == 'r18':
+# if os.path.exists(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db'):
+# print('数据文件存在!')
+# else:
+# session.finish('ERROR: 恁都没库删锤子')
+
+
@on_command('add_check_sepi', aliases=['添加涩批', '移除涩批'], only_to_me = False)
async def _(session: CommandSession):
if session.event.user_id in master: