From 79f3570abebcd05794d657167b7e11f6aecac0c2 Mon Sep 17 00:00:00 2001 From: zkldi Date: Mon, 21 Mar 2022 13:37:54 +0000 Subject: [PATCH] Add pretty version names. --- bot/src/main.ts | 4 ++-- bot/src/server/server.ts | 4 ++-- bot/src/version.ts | 13 +++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/bot/src/main.ts b/bot/src/main.ts index 36d642a0e..82d529566 100644 --- a/bot/src/main.ts +++ b/bot/src/main.ts @@ -8,7 +8,7 @@ import { app } from "./server/server"; import { RegisterSlashCommands } from "./slashCommands/register"; import { CreateLayeredLogger } from "./utils/logger"; import { RFA, TruncateString } from "./utils/misc"; -import { VERSION_STR } from "./version"; +import { VERSION_PRETTY } from "./version"; const logger = CreateLayeredLogger(LoggerLayers.client); @@ -65,7 +65,7 @@ We've sent you a DM with instructions on how to link your account.` (async () => { try { - logger.info(`Booting Tachi Bot v${VERSION_STR}.`); + logger.info(`Booting Tachi Bot ${VERSION_PRETTY}.`); // Login to discord. await client.login(BotConfig.DISCORD.TOKEN); diff --git a/bot/src/server/server.ts b/bot/src/server/server.ts index a2a47f1f4..b53dbaa6e 100644 --- a/bot/src/server/server.ts +++ b/bot/src/server/server.ts @@ -6,7 +6,7 @@ import { LoggerLayers } from "../data/data"; import db from "../database/mongo"; import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "../utils/fetch-tachi"; import { CreateLayeredLogger } from "../utils/logger"; -import { VERSION_STR } from "../version"; +import { VERSION_PRETTY, VERSION_STR } from "../version"; import { ValidateWebhookRequest } from "./middleware"; export const app: Express = express(); @@ -33,7 +33,7 @@ app.get("/", (req, res) => description: "Bot is online!", body: { time: Date.now(), - version: VERSION_STR, + version: VERSION_PRETTY, }, }) ); diff --git a/bot/src/version.ts b/bot/src/version.ts index 18159d353..0fbbce099 100644 --- a/bot/src/version.ts +++ b/bot/src/version.ts @@ -2,10 +2,23 @@ const MAJOR = 2; const MINOR = 0; const PATCH = 0; +const TOKYO_SHOEGAZER_MOONDIVER = [ + "Into the Deep Sky", + "Your Relief", + "In Full Bloom", + "Night Dance", + "Bedtime Story", + "Moondive", + "Stay White", +]; + export const VERSION_INFO = { major: MAJOR, minor: MINOR, patch: PATCH, + name: TOKYO_SHOEGAZER_MOONDIVER[MINOR], }; export const VERSION_STR = `${MAJOR}.${MINOR}.${PATCH}`; + +export const VERSION_PRETTY = `v${VERSION_STR} (${VERSION_INFO.name})`;