From 25752446d6166ff5733909160bae62cdd121339c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 9 Oct 2021 21:02:18 -0400 Subject: a whole lot of nothing --- src/lib/extensions/discord-akairo/BushClient.ts | 2 +- src/lib/models/Guild.ts | 44 +++++++++++-------------- 2 files changed, 20 insertions(+), 26 deletions(-) (limited to 'src/lib') diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index c4f92e7..a053f00 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -353,7 +353,6 @@ export class BushClient extends AkairoClient>.`, false); this.stats.commandsUsed = await UpdateStatsTask.init(); - this.taskHandler.startAll!(); } public async dbPreInit(): Promise { @@ -401,6 +400,7 @@ export class BushClient extends AkairoClient(et: { [K in keyof T]: GuildSetting }) => et; + +export const guildSettingsObj = asGuildSetting({ prefix: { name: 'Prefix', description: 'The phrase required to trigger text commands in this server.', @@ -90,27 +91,20 @@ export const guildSettingsObj: { type: 'channel', configurable: true } -}; +}); -export type GuildSettings = - | 'prefix' - | 'autoPublishChannels' - | 'welcomeChannel' - | 'muteRole' - | 'punishmentEnding' - | 'lockdownChannels' - | 'joinRoles' - | 'bypassChannelBlacklist' - | 'logChannels' - | 'autoModPhases' - | 'noXpChannels' - | 'levelRoles' - | 'levelUpChannel'; +export type GuildSettings = keyof typeof guildSettingsObj; export const settingsArr = Object.keys(guildSettingsObj).filter( (s) => guildSettingsObj[s as GuildSettings].configurable ) as GuildSettings[]; -export const guildFeaturesObj = { +interface GuildFeature { + name: string; + description: string; +} +const asGuildFeature = (gf: { [K in keyof T]: GuildFeature }) => gf; + +export const guildFeaturesObj = asGuildFeature({ automod: { name: 'Automod', description: 'Deletes offensive content as well as phishing links.' @@ -151,7 +145,7 @@ export const guildFeaturesObj = { name: 'Send Level Up Messages', description: 'Send a message when a user levels up.' } -}; +}); export const guildLogsObj = { automod: { -- cgit