mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-27 04:29:50 +01:00
feat: no battles in period
This commit is contained in:
1 parent
75fab881fd
commit
d62ca080e9
1 file changed
+16
-7
+16
-7
@@ -129,14 +129,17 @@ export default {
|
|||||||
} stats`,
|
} stats`,
|
||||||
)
|
)
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`${
|
stats.all.battles > 0
|
||||||
|
? `${
|
||||||
period === 'today'
|
period === 'today'
|
||||||
? '**⚠ "Today" stats are in development. Some stats are not available/wrong.**\n\n'
|
? '**⚠ "Today" stats are in development. Some stats are not available/wrong.**\n\n'
|
||||||
: ''
|
: ''
|
||||||
}${[
|
}${[
|
||||||
[
|
[
|
||||||
'Winrate',
|
'Winrate',
|
||||||
`${(100 * (stats.all.wins / stats.all.battles)).toFixed(2)}%`,
|
`${(100 * (stats.all.wins / stats.all.battles)).toFixed(
|
||||||
|
2,
|
||||||
|
)}%`,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'Survival',
|
'Survival',
|
||||||
@@ -147,7 +150,9 @@ export default {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'Accuracy',
|
'Accuracy',
|
||||||
`${((stats.all.hits / stats.all.shots) * 100).toFixed(2)}%`,
|
`${((stats.all.hits / stats.all.shots) * 100).toFixed(
|
||||||
|
2,
|
||||||
|
)}%`,
|
||||||
],
|
],
|
||||||
['WN8', stats.wn8.toFixed(0)],
|
['WN8', stats.wn8.toFixed(0)],
|
||||||
['WN7', stats.wn7.toFixed(0)],
|
['WN7', stats.wn7.toFixed(0)],
|
||||||
@@ -184,9 +189,9 @@ export default {
|
|||||||
[],
|
[],
|
||||||
[
|
[
|
||||||
'Damage ratio',
|
'Damage ratio',
|
||||||
(stats.all.damage_dealt / stats.all.damage_received).toFixed(
|
(
|
||||||
2,
|
stats.all.damage_dealt / stats.all.damage_received
|
||||||
),
|
).toFixed(2),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'Kills to death ratio',
|
'Kills to death ratio',
|
||||||
@@ -200,7 +205,11 @@ export default {
|
|||||||
.map((array) =>
|
.map((array) =>
|
||||||
array.length === 0 ? '' : `**${array[0]}**: ${array[1]}`,
|
array.length === 0 ? '' : `**${array[0]}**: ${array[1]}`,
|
||||||
)
|
)
|
||||||
.join('\n')}\n\n${blitzLinks(server, blitzAccount.nickname)}`,
|
.join('\n')}\n\n${blitzLinks(
|
||||||
|
server,
|
||||||
|
blitzAccount.nickname,
|
||||||
|
)}`
|
||||||
|
: 'No battles played in this period.',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in new issue
Block a user