aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-02-10 23:29:06 +0100
committerMinteck <contact@minteck.org>2022-02-10 23:29:06 +0100
commita7102acd6fda9168b057d90c961618aead034336 (patch)
tree3db90ae0fe6f78352607d838e29dbf0ba083e09a
parenta7d6b3f75056445d86fbf1cdbc4b4b9d9194e8dc (diff)
downloadponyfind-a7102acd6fda9168b057d90c961618aead034336.tar.gz
ponyfind-a7102acd6fda9168b057d90c961618aead034336.tar.bz2
ponyfind-a7102acd6fda9168b057d90c961618aead034336.zip
Fix: make /random ponies count towards stats
-rw-r--r--commands/random.js6
-rw-r--r--config/version.txt2
2 files changed, 7 insertions, 1 deletions
diff --git a/commands/random.js b/commands/random.js
index 9ac50e2..3769552 100644
--- a/commands/random.js
+++ b/commands/random.js
@@ -16,6 +16,12 @@ module.exports = async (interaction) => {
null,
list[Math.floor(Math.random() * list.length)]
]
+ if (statsPonies[keys[1]] !== undefined) {
+ statsPonies[keys[1]]++;
+ } else {
+ statsPonies[keys[1]] = 1;
+ }
+ fs.writeFile("./stats/ponies.json", JSON.stringify(statsPonies), () => {});
await interaction.reply({
ephemeral: interaction.guild !== null,
embeds: [
diff --git a/config/version.txt b/config/version.txt
index 84da421..8bd7d68 100644
--- a/config/version.txt
+++ b/config/version.txt
@@ -1 +1 @@
-1.2.39 \ No newline at end of file
+1.2.40 \ No newline at end of file