diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-21 12:39:42 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-21 12:39:42 -0400 |
commit | be60d01553dc4e948c8c13400d5a4932fd741ed8 (patch) | |
tree | 2b65b69d2d9706594ec4966a85e8351f0f4365fe /src/tasks/feature/updateStats.js | |
parent | 878bed986193c98ecde99b647b99015bcfec962e (diff) | |
download | tanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.tar.gz tanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.tar.bz2 tanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.zip |
misc
Diffstat (limited to 'src/tasks/feature/updateStats.js')
-rw-r--r-- | src/tasks/feature/updateStats.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/tasks/feature/updateStats.js b/src/tasks/feature/updateStats.js deleted file mode 100644 index 48d431a..0000000 --- a/src/tasks/feature/updateStats.js +++ /dev/null @@ -1,24 +0,0 @@ -import { BushTask, Stat, Time } from '#lib'; -import { Client } from 'discord.js'; -export default class UpdateStatsTask extends BushTask { - constructor() { - super('updateStats', { - delay: 10 * 60000, - runOnStart: true - }); - } - async exec() { - const row = - (await Stat.findByPk(this.client.config.environment)) ?? - (await Stat.create({ environment: this.client.config.environment })); - row.commandsUsed = this.client.stats.commandsUsed; - row.slashCommandsUsed = this.client.stats.slashCommandsUsed; - await row.save(); - } - static async init(client) { - const temp = - (await Stat.findByPk(client.config.environment)) ?? (await Stat.create({ environment: client.config.environment })); - return { commandsUsed: temp.commandsUsed, slashCommandsUsed: temp.slashCommandsUsed }; - } -} -//# sourceMappingURL=updateStats.js.map |