diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/random.js | 6 |
1 files changed, 6 insertions, 0 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: [ |