diff options
Diffstat (limited to 'handler')
-rw-r--r-- | handler/button.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/handler/button.js b/handler/button.js index 7f5893f..c5cfb19 100644 --- a/handler/button.js +++ b/handler/button.js @@ -17,6 +17,12 @@ module.exports = async (interaction) => { if (keys[0] === "pony.display") {
let row;
+ if (statsPonies[keys[1]] !== undefined) {
+ statsPonies[keys[1]]++;
+ } else {
+ statsPonies[keys[1]] = 1;
+ }
+ fs.writeFile("./stats/ponies.json", JSON.stringify(statsPonies), () => {});
if (interaction.guild) {
row = new MessageActionRow()
.addComponents(
|