diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-05-25 17:05:24 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-05-25 17:05:24 -0400 |
commit | 59ea06a2f010ad7503e4f7b7a1894485d37a416e (patch) | |
tree | 78a20be7fb7aad6e77b906a641e7755ec4baee55 /src/lib/extensions | |
parent | 994de0471e7032e8c1fc7d7621ecae880746a3f1 (diff) | |
download | tanzanite-59ea06a2f010ad7503e4f7b7a1894485d37a416e.tar.gz tanzanite-59ea06a2f010ad7503e4f7b7a1894485d37a416e.tar.bz2 tanzanite-59ea06a2f010ad7503e4f7b7a1894485d37a416e.zip |
feat: add slash command usage
Diffstat (limited to 'src/lib/extensions')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 5ccc283..4df751d 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -125,7 +125,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re /** * Stats for the client. */ - public stats: BushStats = { cpu: undefined, commandsUsed: 0n }; + public stats: BushStats = { cpu: undefined, commandsUsed: 0n, slashCommandsUsed: 0n }; /** * The configuration for the client. @@ -482,7 +482,9 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re await this.highlightManager.syncCache(); await UpdateCacheTask.init(this); void this.console.success('startup', `Successfully created <<cache>>.`, false); - this.stats.commandsUsed = await UpdateStatsTask.init(); + const stats = await UpdateStatsTask.init(); + this.stats.commandsUsed = stats.commandsUsed; + this.stats.slashCommandsUsed = stats.slashCommandsUsed; await this.login(this.token!); } catch (e) { await this.console.error('start', util.inspect(e, { colors: true, depth: 1 }), false); @@ -539,6 +541,11 @@ export interface BushStats { * The total number of times any command has been used. */ commandsUsed: bigint; + + /** + * The total number of times any slash command has been used. + */ + slashCommandsUsed: bigint; } export interface Emitters { |