diff options
author | Minteck <contact@minteck.org> | 2022-02-10 23:19:40 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-10 23:19:40 +0100 |
commit | 182b5f0f707d934b9ba63fae2499a2a33b8ce56c (patch) | |
tree | d36b91da9e338adfaccd23d743d41c62f2632c2a /commands/pony.js | |
parent | c64a8447e26676769d2a0f86b6006214378566f5 (diff) | |
download | ponyfind-182b5f0f707d934b9ba63fae2499a2a33b8ce56c.tar.gz ponyfind-182b5f0f707d934b9ba63fae2499a2a33b8ce56c.tar.bz2 ponyfind-182b5f0f707d934b9ba63fae2499a2a33b8ce56c.zip |
Fix: #3 not counting ponies
Diffstat (limited to 'commands/pony.js')
-rw-r--r-- | commands/pony.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/commands/pony.js b/commands/pony.js index 1cd6006..4654b12 100644 --- a/commands/pony.js +++ b/commands/pony.js @@ -26,6 +26,12 @@ module.exports = async (interaction) => { fs.writeFile("./stats/queries.json", JSON.stringify(statsQueries), () => {}); if (result.results[0].toLowerCase().trim() === query.toLowerCase().trim()) { keys = [null, result.results[0]]; + 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( |