aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/feature
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-21 12:39:42 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-21 12:39:42 -0400
commitbe60d01553dc4e948c8c13400d5a4932fd741ed8 (patch)
tree2b65b69d2d9706594ec4966a85e8351f0f4365fe /src/tasks/feature
parent878bed986193c98ecde99b647b99015bcfec962e (diff)
downloadtanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.tar.gz
tanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.tar.bz2
tanzanite-be60d01553dc4e948c8c13400d5a4932fd741ed8.zip
misc
Diffstat (limited to 'src/tasks/feature')
-rw-r--r--src/tasks/feature/updateStats.d.ts10
-rw-r--r--src/tasks/feature/updateStats.js24
-rw-r--r--src/tasks/feature/updateStats.js.map1
3 files changed, 0 insertions, 35 deletions
diff --git a/src/tasks/feature/updateStats.d.ts b/src/tasks/feature/updateStats.d.ts
deleted file mode 100644
index 22e0308..0000000
--- a/src/tasks/feature/updateStats.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { BushTask } from '#lib';
-import { Client } from 'discord.js';
-export default class UpdateStatsTask extends BushTask {
- constructor();
- exec(): Promise<void>;
- static init(client: Client): Promise<{
- commandsUsed: bigint;
- slashCommandsUsed: bigint;
- }>;
-}
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
diff --git a/src/tasks/feature/updateStats.js.map b/src/tasks/feature/updateStats.js.map
deleted file mode 100644
index 01cd260..0000000
--- a/src/tasks/feature/updateStats.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"updateStats.js","sourceRoot":"","sources":["updateStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACpD;QACC,KAAK,CAAC,aAAa,EAAE;YACpB,KAAK,EAAE,EAAE,QAAc;YACvB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI;QAChB,MAAM,GAAG,GACR,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACrD,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACtE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;QAClD,GAAG,CAAC,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAC5D,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAc;QACtC,MAAM,IAAI,G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