Skip to content

Commit

Permalink
Merge branch 'master' of github.com:akargl/Foxxobot
Browse files Browse the repository at this point in the history
  • Loading branch information
akargl committed Feb 24, 2021
2 parents f6cf317 + 3ae3f84 commit 4ef70e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions commands/oida.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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));

Expand Down
6 changes: 4 additions & 2 deletions commands/oidacount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
},
};
};

0 comments on commit 4ef70e8

Please sign in to comment.