mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
新增ysda
This commit is contained in:
parent
c417d15ed1
commit
853c452a5a
@ -573,9 +573,14 @@ async def _(event: MessageEvent, state: T_State, msg: Message = CommandArg()):
|
||||
msg = msg.extract_plain_text().replace(state['uid'], '').strip()
|
||||
if not msg:
|
||||
await role_info.finish('请把要查询角色名给派蒙哦~')
|
||||
if msg.startswith(('a', '全部', '所有', '查看')):
|
||||
state['role'] = 'all'
|
||||
else:
|
||||
match_alias = get_match_alias(msg, 'roles', True)
|
||||
state['role'] = match_alias if isinstance(match_alias, str) else tuple(match_alias.keys())[0]
|
||||
if match_alias:
|
||||
state['role'] = match_alias if isinstance(match_alias, str) else tuple(match_alias.keys())[0]
|
||||
else:
|
||||
await role_info.finish(MsgBd.Text(f'哪有名为{msg}的角色啊,别拿派蒙开玩笑!'))
|
||||
|
||||
|
||||
@role_info.got('uid', prompt='请把要查询的uid给派蒙哦~')
|
||||
@ -590,8 +595,16 @@ async def _(event: MessageEvent, state: T_State):
|
||||
role = state['role']
|
||||
player_info = PlayerInfo(uid)
|
||||
roles_list = player_info.get_roles_list()
|
||||
if role == 'all':
|
||||
if not roles_list:
|
||||
await role_info.finish('你在派蒙这里没有角色面板信息哦,先用 更新角色信息 命令获取吧~', at_sender=True)
|
||||
res = '目前已获取的角色面板有:\n'
|
||||
for r in roles_list:
|
||||
res += r
|
||||
res += ' ' if (roles_list.index(r) + 1) % 4 else '\n'
|
||||
await role_info.finish(res, at_sender=True)
|
||||
if role not in roles_list:
|
||||
await role_info.finish(MsgBd.Text(f'派蒙还没有你{role}的信息哦,请先把该角色放在游戏内展柜中,然后使用 更新角色信息 命令更新~'), at_sender=True)
|
||||
await role_info.finish(MsgBd.Text(f'派蒙还没有你{role}的信息哦,先用 更新角色信息 命令更新吧~'), at_sender=True)
|
||||
else:
|
||||
role_data = player_info.get_roles_info(role)
|
||||
img = await draw_role_card(uid, role_data)
|
||||
@ -709,7 +722,7 @@ async def daily_update():
|
||||
await reset_public_cookie()
|
||||
|
||||
|
||||
@scheduler.scheduled_job('cron', hour=3, misfire_grace_time=10)
|
||||
# @scheduler.scheduled_job('cron', hour=3, misfire_grace_time=10)
|
||||
async def all_update():
|
||||
uid_list = await get_all_query()
|
||||
logger.info('派蒙开始更新用户角色信息,共{}个用户'.format(len(uid_list)))
|
||||
|
@ -64,9 +64,9 @@
|
||||
</details>
|
||||
|
||||
## 丨更新日志
|
||||
> README只展示最近2条更新,全部更新日志详见[这里](https://github.com/CMHopeSunshine/LittlePaimon/blob/nonebot2/UPDATE_LOG.md)
|
||||
> README只展示最近3条更新,全部更新日志详见[这里](https://github.com/CMHopeSunshine/LittlePaimon/blob/nonebot2/UPDATE_LOG.md)
|
||||
+ 6.21
|
||||
- 适配`nonebot2 beta4`插件元数据,请更新nb版本`pip install nonebot2 --upgrade`
|
||||
- 适配`nonebot2 beta4`插件元数据,**请更新nb版本`pip install nonebot2 --upgrade`**
|
||||
- `Paimon_Chat`现在可以发图片、视频等,可自行添加
|
||||
- 修复`Paimon_Wiki`搜索对象名结果只有一个时仍需要选择的bug
|
||||
- 对对联功能api更换
|
||||
@ -76,6 +76,9 @@
|
||||
+ 6.22
|
||||
- 增加文本敏感词过滤
|
||||
- fix `原神日历`和发送图片bug
|
||||
+ 6.23
|
||||
- 新增查看所有已获取面板信息的角色的列表`ysda`
|
||||
- 暂时取消凌晨3点的自动更新角色面板操作
|
||||
|
||||
## 丨功能列表
|
||||
|
||||
|
@ -46,3 +46,6 @@
|
||||
+ 6.22
|
||||
- 增加文本敏感词过滤
|
||||
- fix `原神日历`和发送图片bug
|
||||
+ 6.23
|
||||
- 新增查看所有已获取面板信息的角色的列表`ysda`
|
||||
- 暂时取消凌晨3点的自动更新角色面板操作
|
Loading…
Reference in New Issue
Block a user