mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02: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`,
|
||||
)
|
||||
.setDescription(
|
||||
`${
|
||||
stats.all.battles > 0
|
||||
? `${
|
||||
period === 'today'
|
||||
? '**⚠ "Today" stats are in development. Some stats are not available/wrong.**\n\n'
|
||||
: ''
|
||||
}${[
|
||||
[
|
||||
'Winrate',
|
||||
`${(100 * (stats.all.wins / stats.all.battles)).toFixed(2)}%`,
|
||||
`${(100 * (stats.all.wins / stats.all.battles)).toFixed(
|
||||
2,
|
||||
)}%`,
|
||||
],
|
||||
[
|
||||
'Survival',
|
||||
@@ -147,7 +150,9 @@ export default {
|
||||
],
|
||||
[
|
||||
'Accuracy',
|
||||
`${((stats.all.hits / stats.all.shots) * 100).toFixed(2)}%`,
|
||||
`${((stats.all.hits / stats.all.shots) * 100).toFixed(
|
||||
2,
|
||||
)}%`,
|
||||
],
|
||||
['WN8', stats.wn8.toFixed(0)],
|
||||
['WN7', stats.wn7.toFixed(0)],
|
||||
@@ -184,9 +189,9 @@ export default {
|
||||
[],
|
||||
[
|
||||
'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',
|
||||
@@ -200,7 +205,11 @@ export default {
|
||||
.map((array) =>
|
||||
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