提交 69b8cd9a 编辑于 作者: yuudi's avatar yuudi
浏览文件

fix: subscribers-list message

上级 4a601c32
{
"stable": {
"version": 3458,
"url": "http://img.yobot.xyz/yobot/yobot3458.zip"
"version": 3459,
"url": "http://img.yobot.xyz/yobot/yobot3459.zip"
}
}
\ No newline at end of file
......@@ -93,7 +93,11 @@
{% endfor -%}
</tbody>
</table>
<div>数据来源<a href="{{ 'https://nomae.net/arenadb/' if search_source=='nomae.net' else 'https://www.pcrdfans.com/battle' }}/">{{ search_source }}</a></div>
{% if search_source=="nomae.net" -%}
<div>数据来源<a href="https://nomae.net/arenadb/">nomae.net</a></div>
{% elif search_source=="pcrdfans.com" -%}
<div>数据来源<a href="https://www.pcrdfans.com/battle">公主连结Re: Dive Fan Club</a></div>
{% endif -%}
</body>
</html>
\ No newline at end of file
......@@ -133,14 +133,17 @@ class ClanBattle:
return user.nickname or str(qqid)
def _get_group_previous_challenge(self, group: Clan_group):
try:
lc = Clan_challenge.select(
peewee.fn.MAX(Clan_challenge.cid)
Clan_challenge_alias = Clan_challenge.alias()
query = Clan_challenge.select().where(
Clan_challenge.cid == Clan_challenge_alias.select(
peewee.fn.MAX(Clan_challenge_alias.cid)
).where(
Clan_challenge.gid == group.group_id,
Clan_challenge.bid == group.battle_id,
).scalar()
return Clan_challenge.get_by_id(lc)
Clan_challenge_alias.gid == group.group_id,
Clan_challenge_alias.bid == group.battle_id,
)
)
try:
return query.get()
except peewee.DoesNotExist:
return None
......@@ -1046,9 +1049,9 @@ class ClanBattle:
@timed_cached_func(max_len=64, max_age_seconds=10, ignore_self=True)
def get_battle_member_list(self,
group_id: Groupid,
battle_id: Union[str, int, None],
):
group_id: Groupid,
battle_id: Union[str, int, None],
):
"""
get the member lists for clan-battle report
......@@ -1401,9 +1404,9 @@ class ClanBattle:
return '没有人'+beh
reply = beh+'的成员:\n'
for m in subscribers:
reply+=self._get_nickname_by_qqid(m['qqid'])
if m.get('message', ''):
reply += ':'+ m.get['message']
reply += '\n'+self._get_nickname_by_qqid(m['qqid'])
if m.get('message'):
reply += ':' + m['message']
return reply
def register_routes(self, app: Quart):
......
......@@ -33,8 +33,8 @@ else:
class Yobot:
Version = "[v3.6.1_rc2]"
Version_id = 158
Version = "[v3.6.1]"
Version_id = 159
# "git rev-list --count HEAD"
def __init__(self, *,
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册