kill count
This commit is contained in:
parent
93e1500e98
commit
94298202b8
4
bot.js
4
bot.js
@ -36,10 +36,10 @@ bot.command(
|
|||||||
'kills',
|
'kills',
|
||||||
({ replyWithMarkdown }) => getAllKills()
|
({ replyWithMarkdown }) => getAllKills()
|
||||||
.then(allKills => {
|
.then(allKills => {
|
||||||
let groupedKills = []
|
let groupedKills = [{}]
|
||||||
let currentGroupId = 0
|
let currentGroupId = 0
|
||||||
allKills.forEach(kills => {
|
allKills.forEach(kills => {
|
||||||
if (currentGroupId !== 0 && groupedKills[currentGroupId].displayName !== kills.displayName) {
|
if (groupedKills[currentGroupId].displayName && groupedKills[currentGroupId].displayName !== kills.displayName) {
|
||||||
currentGroupId++
|
currentGroupId++
|
||||||
}
|
}
|
||||||
groupedKills[currentGroupId] = {
|
groupedKills[currentGroupId] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user