mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-30 04:00:31 +08:00
✨ 新增gs开启催命模式
This commit is contained in:
parent
5d497294c2
commit
940b93f851
@ -20,6 +20,7 @@ SWITCH_MAP = {
|
|||||||
'随机图': 'RandomPic',
|
'随机图': 'RandomPic',
|
||||||
'定时签到': 'SchedSignin',
|
'定时签到': 'SchedSignin',
|
||||||
'定时米游币': 'SchedMhyBBSCoin',
|
'定时米游币': 'SchedMhyBBSCoin',
|
||||||
|
'催命模式': 'CrazyNotice',
|
||||||
}
|
}
|
||||||
|
|
||||||
PUSH_MAP = {
|
PUSH_MAP = {
|
||||||
|
@ -4,6 +4,7 @@ from nonebot.log import logger
|
|||||||
|
|
||||||
from ..utils.mhy_api.get_mhy_data import get_daily_data
|
from ..utils.mhy_api.get_mhy_data import get_daily_data
|
||||||
from ..utils.db_operation.db_operation import (
|
from ..utils.db_operation.db_operation import (
|
||||||
|
config_check,
|
||||||
get_push_data,
|
get_push_data,
|
||||||
update_is_pushed,
|
update_is_pushed,
|
||||||
get_all_push_list,
|
get_all_push_list,
|
||||||
@ -54,10 +55,13 @@ async def all_check(
|
|||||||
for mode in ['Coin', 'Resin', 'Go', 'Transform']:
|
for mode in ['Coin', 'Resin', 'Go', 'Transform']:
|
||||||
# 检查条件
|
# 检查条件
|
||||||
if push_data[f'{mode}IsPush'] == 'on':
|
if push_data[f'{mode}IsPush'] == 'on':
|
||||||
if not await check(mode, raw_data, push_data[f'{mode}Value']):
|
if not await config_check('CrazyNotice'):
|
||||||
await update_is_pushed(uid, mode, 'off')
|
if not await check(mode, raw_data, push_data[f'{mode}Value']):
|
||||||
continue
|
await update_is_pushed(uid, mode, 'off')
|
||||||
|
continue
|
||||||
|
# 准备推送
|
||||||
if await check(mode, raw_data, push_data[f'{mode}Value']):
|
if await check(mode, raw_data, push_data[f'{mode}Value']):
|
||||||
|
# on 推送到私聊
|
||||||
if push_data[f'{mode}Push'] == 'on':
|
if push_data[f'{mode}Push'] == 'on':
|
||||||
# 初始化
|
# 初始化
|
||||||
if qid not in private_msg_list:
|
if qid not in private_msg_list:
|
||||||
@ -65,8 +69,10 @@ async def all_check(
|
|||||||
# 添加私聊信息
|
# 添加私聊信息
|
||||||
private_msg_list[qid] += NOTICE[mode]
|
private_msg_list[qid] += NOTICE[mode]
|
||||||
await update_is_pushed(uid, mode, 'on')
|
await update_is_pushed(uid, mode, 'on')
|
||||||
|
# off不推送
|
||||||
elif push_data[f'{mode}Push'] == 'off':
|
elif push_data[f'{mode}Push'] == 'off':
|
||||||
pass
|
pass
|
||||||
|
# 群号推送到群聊
|
||||||
else:
|
else:
|
||||||
# 初始化
|
# 初始化
|
||||||
if push_data[f'{mode}Push'] not in group_msg_list:
|
if push_data[f'{mode}Push'] not in group_msg_list:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user