kill count

This commit is contained in:
smsteel 2019-02-11 16:09:01 +03:00
parent 93e1500e98
commit 94298202b8

4
bot.js
View File

@ -36,10 +36,10 @@ bot.command(
'kills',
({ replyWithMarkdown }) => getAllKills()
.then(allKills => {
let groupedKills = []
let groupedKills = [{}]
let currentGroupId = 0
allKills.forEach(kills => {
if (currentGroupId !== 0 && groupedKills[currentGroupId].displayName !== kills.displayName) {
if (groupedKills[currentGroupId].displayName && groupedKills[currentGroupId].displayName !== kills.displayName) {
currentGroupId++
}
groupedKills[currentGroupId] = {