From dbf3dd8ed96d2463d5b41e472f1bc71c562b5aca Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 15 Dec 2023 22:45:44 +0200 Subject: [PATCH] cleanup --- src/client/DiscordClient.ts | 9 ++++++--- src/client/components/commands/developer/Stats.ts | 14 +------------- .../en_gb/commands/en_gb_information.lang | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/client/DiscordClient.ts b/src/client/DiscordClient.ts index c16a563..b6d5711 100644 --- a/src/client/DiscordClient.ts +++ b/src/client/DiscordClient.ts @@ -231,11 +231,14 @@ class DiscordClient extends Client // Needs to load in after connecting to discord await this.#moderationManager.initialise(); - this.setActivity(); - this.#activityInterval = setInterval(() => + if (this.shardId === 0) { this.setActivity(); - }, Util.random(5, 10) * 60 * 60 * 1000); + this.#activityInterval = setInterval(() => + { + this.setActivity(); + }, Util.random(5, 10) * 60 * 60 * 1000); + } this.#built = true; this.emit('built'); diff --git a/src/client/components/commands/developer/Stats.ts b/src/client/components/commands/developer/Stats.ts index 07d4e39..bc86574 100644 --- a/src/client/components/commands/developer/Stats.ts +++ b/src/client/components/commands/developer/Stats.ts @@ -1,5 +1,4 @@ import { Client, TextChannel, version } from 'discord.js'; -import { CommandOptionType } from '../../../../../@types/Client.js'; import DiscordClient from '../../../DiscordClient.js'; import SlashCommand from '../../../interfaces/commands/SlashCommand.js'; import InvokerWrapper from '../../wrappers/InvokerWrapper.js'; @@ -17,16 +16,7 @@ class StatsCommand extends SlashCommand aliases: [ ], description: 'Statistics about the bot', // restricted: true, - options: [ - { - name: 'log', - type: CommandOptionType.BOOLEAN, - description: 'Logs the output in the console.', - flag: true, - valueOptional: true, - defaultValue: true - } - ], + options: [ ], clientPermissions: [ 'SendMessages', 'EmbedLinks' ], showUsage: false, archivable: false @@ -36,8 +26,6 @@ class StatsCommand extends SlashCommand // eslint-disable-next-line max-lines-per-function async execute (invoker: InvokerWrapper) { - // TODO: - // Add some stuff that only shows when a dev runs the command, for instance amount of cached messages etc const shard = this.client.shard!; const author = await invoker.userWrapper(); if (!author) diff --git a/src/localization/en_gb/commands/en_gb_information.lang b/src/localization/en_gb/commands/en_gb_information.lang index 0ac7f2a..770a1d8 100644 --- a/src/localization/en_gb/commands/en_gb_information.lang +++ b/src/localization/en_gb/commands/en_gb_information.lang @@ -2,7 +2,7 @@ Privacy Policy [COMMAND_PRIVACY_POLICY] -Galactic (stable) and Galactic Canary (testing) bots collect and store IDs in moderation logs and configuration. Message content is only ever stored by the bot when it is obvious from the use case to do so (typically this would be a configuration for something like a template message). Message content is not stored outside of the bot's working memory and never leaves the Discord context (except for the aforementioned case). Any message logs are purely based on output in channels at this time. +Galactic (stable) and Galactic Beta/Canary (testing) bots collect and store IDs in moderation logs and configuration. Message content is only ever stored by the bot when it is obvious from the use case to do so (typically this would be a configuration for something like a template message). Message content is not stored outside of the bot's working memory and never leaves the Discord context (except for the aforementioned case). Any message logs are purely based on output in channels at this time. This text will be updated according should this ever change.