mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-06-01 21:19:49 +08:00
fix
This commit is contained in:
parent
0462f28d76
commit
29567d22ee
14
__init__.py
14
__init__.py
@ -153,26 +153,24 @@ async def _(bot:HoshinoBot, ev: CQEvent):
|
|||||||
|
|
||||||
#每日零点半进行米游社签到
|
#每日零点半进行米游社签到
|
||||||
@sv.scheduled_job('cron', hour='0',minute="30")
|
@sv.scheduled_job('cron', hour='0',minute="30")
|
||||||
@daily_sign.scheduled_job('cron', hour='0', minute="30")
|
async def dailysign():
|
||||||
async def _():
|
|
||||||
await dailysign()
|
await dailysign()
|
||||||
|
|
||||||
|
|
||||||
async def dailysign():
|
async def dailysign():
|
||||||
(bot,) = nonebot.get_bots().values()
|
|
||||||
conn = sqlite3.connect('ID_DATA.db')
|
conn = sqlite3.connect('ID_DATA.db')
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
cursor = c.execute(
|
cursor = c.execute(
|
||||||
"SELECT * FROM NewCookiesTable WHERE StatusB != ?", ("off",))
|
"SELECT * FROM NewCookiesTable WHERE StatusB != ?", ("off",))
|
||||||
c_data = cursor.fetchall()
|
c_data = cursor.fetchall()
|
||||||
|
|
||||||
for row in c_data:
|
for row in c_data:
|
||||||
|
|
||||||
im = await sign(str(row[0]))
|
im = await sign(str(row[0]))
|
||||||
if row[4] == "on":
|
if row[4] == "on":
|
||||||
await bot.call_api(api='send_private_msg',
|
await bot.send_private_msg(user_id = row[2],message = im)
|
||||||
user_id=row[2], message=im)
|
|
||||||
else:
|
else:
|
||||||
await bot.call_api(
|
await bot.send_group_msg(group_id = row[4],message = f"[CQ:at,qq={row[2]}]" + "\n" + im)
|
||||||
api='send_group_msg', group_id=row[4], message=f"[CQ:at,qq={row[2]}]\n{im}")
|
|
||||||
await asyncio.sleep(7)
|
await asyncio.sleep(7)
|
||||||
|
|
||||||
#每隔半小时检测树脂是否超过设定值
|
#每隔半小时检测树脂是否超过设定值
|
||||||
|
Loading…
x
Reference in New Issue
Block a user