diff --git a/commands/oida.js b/commands/oida.js index ee430e0..b3490a8 100644 --- a/commands/oida.js +++ b/commands/oida.js @@ -34,7 +34,7 @@ module.exports = { return message.reply("Bist oag??!! Die selbe Person 2x oidan is verboten!"); } } else { - this.oidaCount[sourceid] = { oidaCount: 0, lasttarget: "", lastsource: "", lasttime: 0 }; + this.oidaCount[sourceid] = { oidaCount: 0, oidasgiven: 0, lasttarget: "", lastsource: "", lasttime: 0 }; } if (this.oidaCount.hasOwnProperty(targetid)) { @@ -46,13 +46,14 @@ module.exports = { return message.reply("NA!!! Den hauma grod erst geoidat, suach da wen andern zum sekkiern!"); } } else { - this.oidaCount[targetid] = { oidaCount: 0, lasttarget: "", lastsource: "", lasttime: 0 }; + this.oidaCount[targetid] = { oidaCount: 0, oidasgiven: 0, lasttarget: "", lastsource: "", lasttime: 0 }; } this.oidaCount[targetid].oidaCount++; this.oidaCount[targetid].lastsource = sourceid; this.oidaCount[targetid].lasttime = Date.now(); this.oidaCount[sourceid].lasttarget = targetid; + this.oidaCount[sourceid].oidasgiven++; fs.writeFileSync("oidacount.json", JSON.stringify(this.oidaCount, undefined, 4)); diff --git a/commands/oidacount.js b/commands/oidacount.js index 79d9f23..e59720b 100644 --- a/commands/oidacount.js +++ b/commands/oidacount.js @@ -50,11 +50,13 @@ module.exports = { if (leaderboardString.length + row.length > (2000 - 3)) { break; } - leaderboardString += row; + if (x.count != 0) { + leaderboardString += row; + } } leaderboardString += "```"; return message.channel.send(leaderboardString); }); }, -}; \ No newline at end of file +};