Skip to content
GitLab
菜单
项目
群组
代码片段
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录/注册
切换导航
菜单
打开侧边栏
Wei Zhu
yobot
提交
ed081b09
提交
ed081b09
编辑于
6月 06, 2020
作者:
yuudi
浏览文件
fix: statistics2 compatibility
上级
2ceaf42b
变更
7
Hide whitespace changes
Inline
Side-by-side
docs/v3/ver.json
浏览文件 @
ed081b09
{
"stable"
:
{
"version"
:
34
87
,
"url"
:
"http://img.yobot.xyz/yobot/yobot34
87
.zip"
"version"
:
34
93
,
"url"
:
"http://img.yobot.xyz/yobot/yobot34
93
.zip"
}
}
\ No newline at end of file
src/client/public/static/clan/statistics/statistics2.js
浏览文件 @
ed081b09
...
...
@@ -1078,7 +1078,7 @@ var vm = new Vue({
},
getPlayer
:
function
(
qqid
)
{
return
this
.
members
.
find
(
o
=>
o
.
qqid
===
qqid
)
??
{
nickname
:
'
未加入
'
,
qqid
:
qqid
,
sl
:
null
};
return
this
.
members
.
find
(
o
=>
o
.
qqid
===
qqid
)
||
{
nickname
:
'
未加入
'
,
qqid
:
qqid
,
sl
:
null
};
},
playerDamage
:
function
(
playerQQid
)
{
...
...
src/client/public/template/help.html
浏览文件 @
ed081b09
...
...
@@ -121,8 +121,8 @@
</td>
</tr>
<tr>
<td>
SL
</td>
<td>
挑战boss强制取消后用,记录本日SL
<sup
class=
"footnote"
>
2
</sup></td>
<td>
SL
[?]
</td>
<td>
挑战boss强制取消后用,记录本日SL
<sup
class=
"footnote"
>
2
</sup>
,用“?”查询今日是否已 SL
</td>
</tr>
<tr>
<td>
撤销
</td>
...
...
src/client/public/template/login.html
浏览文件 @
ed081b09
...
...
@@ -95,7 +95,7 @@
const
temp_form
=
document
.
createElement
(
"
form
"
);
temp_form
.
action
=
url
;
//如需打开新窗口,form的target属性要设置为'_blank'
temp_form
.
target
=
"
_blank
"
;
//
temp_form.target = "_blank";
temp_form
.
method
=
"
post
"
;
temp_form
.
style
.
display
=
"
none
"
;
//添加参数
...
...
src/client/ybplugins/clan_battle/battle.py
浏览文件 @
ed081b09
...
...
@@ -950,7 +950,7 @@ class ClanBattle:
self
.
_boss_status
[
group_id
]
=
asyncio
.
get_event_loop
().
create_future
()
return
status
def
save_slot
(
self
,
group_id
:
Groupid
,
qqid
:
QQid
,
todaystatus
:
Optional
[
bool
]
=
True
):
def
save_slot
(
self
,
group_id
:
Groupid
,
qqid
:
QQid
,
todaystatus
:
bool
=
True
,
only_check
:
bool
=
False
):
"""
record today's save slot
...
...
@@ -966,6 +966,8 @@ class ClanBattle:
if
membership
is
None
:
raise
UserNotInGroup
today
,
_
=
pcr_datetime
(
group
.
game_server
)
if
only_check
:
return
(
membership
.
last_save_slot
==
today
)
if
todaystatus
:
if
membership
.
last_save_slot
==
today
:
raise
UserError
(
'您今天已经存在SL记录了'
)
...
...
@@ -990,7 +992,7 @@ class ClanBattle:
# refresh
self
.
get_member_list
(
group_id
,
nocache
=
True
)
return
return
todaystatus
@
timed_cached_func
(
max_len
=
64
,
max_age_seconds
=
10
,
ignore_self
=
True
)
def
get_report
(
self
,
...
...
@@ -1398,15 +1400,21 @@ class ClanBattle:
)
return
f
'公会战面板:
\n
{
url
}
\n
建议添加到浏览器收藏夹或桌面快捷方式'
elif
match_num
==
16
:
# SL
if
len
(
cmd
)
!=
2
:
return
try
:
self
.
save_slot
(
group_id
,
user_id
)
except
ClanBattleError
as
e
:
_logger
.
info
(
'群聊 失败 {} {} {}'
.
format
(
user_id
,
group_id
,
cmd
))
return
str
(
e
)
_logger
.
info
(
'群聊 成功 {} {} {}'
.
format
(
user_id
,
group_id
,
cmd
))
return
'已记录SL'
if
len
(
cmd
)
==
2
:
try
:
self
.
save_slot
(
group_id
,
user_id
)
except
ClanBattleError
as
e
:
_logger
.
info
(
'群聊 失败 {} {} {}'
.
format
(
user_id
,
group_id
,
cmd
))
return
str
(
e
)
_logger
.
info
(
'群聊 成功 {} {} {}'
.
format
(
user_id
,
group_id
,
cmd
))
return
'已记录SL'
elif
cmd
[
2
:].
strip
()
in
[
'?'
,
'?'
]:
sl_ed
=
self
.
save_slot
(
group_id
,
user_id
,
only_check
=
True
)
if
sl_ed
:
return
'今日已使用SL'
else
:
return
'今日未使用SL'
elif
20
<=
match_num
<=
25
:
if
len
(
cmd
)
!=
2
:
return
...
...
src/client/ybplugins/gacha.py
浏览文件 @
ed081b09
...
...
@@ -169,6 +169,8 @@ class Gacha:
if
today
!=
last_day
:
last_day
=
today
day_times
=
0
if
day_limit
!=
0
and
day_times
+
20
>
day_limit
:
return
"{}今天剩余抽卡次数不足30次,不能抽一井"
.
format
(
nickname
,
day_times
)
reply
=
""
result
=
""
flag_fully_30_times
=
True
...
...
src/client/yobot.py
浏览文件 @
ed081b09
...
...
@@ -33,8 +33,8 @@ else:
class
Yobot
:
Version
=
"[v3.6.3-beta.
1
]"
Version_id
=
1
8
9
Version
=
"[v3.6.3-beta.
2
]"
Version_id
=
19
3
# "git rev-list --count HEAD"
def
__init__
(
self
,
*
,
...
...
编辑
预览
Supports
Markdown
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录