From 0c58515fd0fc63c301440b0ab51714dac71f6576 Mon Sep 17 00:00:00 2001 From: tresabhi Date: Sun, 2 Jul 2023 17:53:20 +0000 Subject: [PATCH] feat: added changelogs --- .gitignore | 4 ++-- docs/.vitepress/config.ts | 2 +- docs/changelogs/1.3.0.md | 9 +++++++++ docs/changelogs/1.3.1.md | 8 ++++++++ docs/changelogs/1.3.2.md | 5 +++++ docs/changelogs/1.3.3.md | 8 ++++++++ docs/changelogs/1.4.0.md | 28 ++++++++++++++++++++++++++++ docs/changelogs/1.4.1.md | 3 +++ docs/changelogs/1.5.0.md | 23 +++++++++++++++++++++++ docs/changelogs/1.5.1.md | 3 +++ docs/changelogs/1.5.2.md | 14 ++++++++++++++ docs/changelogs/1.5.3.md | 10 ++++++++++ docs/changelogs/1.5.4.md | 8 ++++++++ docs/changelogs/1.6.0.md | 25 +++++++++++++++++++++++++ docs/changelogs/1.7.0.md | 20 ++++++++++++++++++++ docs/changelogs/1.7.1.md | 3 +++ docs/changelogs/1.7.2.md | 7 +++++++ docs/changelogs/1.7.3-1.7.4.md | 3 +++ docs/changelogs/1.7.5.md | 11 +++++++++++ docs/changelogs/1.7.6.md | 14 ++++++++++++++ docs/changelogs/1.7.7.md | 7 +++++++ docs/changelogs/1.8.0.md | 26 ++++++++++++++++++++++++++ docs/changelogs/1.8.1.md | 7 +++++++ docs/changelogs/1.9.0.md | 32 ++++++++++++++++++++++++++++++++ 24 files changed, 277 insertions(+), 3 deletions(-) create mode 100644 docs/changelogs/1.3.0.md create mode 100644 docs/changelogs/1.3.1.md create mode 100644 docs/changelogs/1.3.2.md create mode 100644 docs/changelogs/1.3.3.md create mode 100644 docs/changelogs/1.4.0.md create mode 100644 docs/changelogs/1.4.1.md create mode 100644 docs/changelogs/1.5.0.md create mode 100644 docs/changelogs/1.5.1.md create mode 100644 docs/changelogs/1.5.2.md create mode 100644 docs/changelogs/1.5.3.md create mode 100644 docs/changelogs/1.5.4.md create mode 100644 docs/changelogs/1.6.0.md create mode 100644 docs/changelogs/1.7.0.md create mode 100644 docs/changelogs/1.7.1.md create mode 100644 docs/changelogs/1.7.2.md create mode 100644 docs/changelogs/1.7.3-1.7.4.md create mode 100644 docs/changelogs/1.7.5.md create mode 100644 docs/changelogs/1.7.6.md create mode 100644 docs/changelogs/1.7.7.md create mode 100644 docs/changelogs/1.8.0.md create mode 100644 docs/changelogs/1.8.1.md create mode 100644 docs/changelogs/1.9.0.md diff --git a/.gitignore b/.gitignore index dc5461e03..2d75ee75a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,5 @@ yarn-error.log dist.zip commands.txt /test.* -.vitepress/dist -.vitepress/cache \ No newline at end of file +/docs/.vitepress/dist +/docs/.vitepress/cache \ No newline at end of file diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 5e0b39f65..1ca03e98e 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -12,7 +12,7 @@ export default defineConfig({ sidebar: getSidebar({ collapsed: false, - contentDirs: ['guide', 'legal'], + contentDirs: ['guide', 'legal', 'changelogs'], contentRoot: '/docs/', }) as DefaultTheme.Sidebar, diff --git a/docs/changelogs/1.3.0.md b/docs/changelogs/1.3.0.md new file mode 100644 index 000000000..209438f62 --- /dev/null +++ b/docs/changelogs/1.3.0.md @@ -0,0 +1,9 @@ +# Blitzkrieg 1.3.0 + +This release of Blitzkrieg focuses mainly on **performance**. Blitzkrieg now uses **Satori** and **resvg** under the hood to render images resulting in a solid **2x to 8x performance boost** depending on the situation. + +This only applies to `/today` and /stats` as they're the only commands that render an image currently. + +We're working further on **performance optimizations**. Our goal is to deliver a message within **3 seconds or less**. We're close and we'll get there! + +**Thank you to ba·ka**, the creator of aftermath, for telling me about Satori! diff --git a/docs/changelogs/1.3.1.md b/docs/changelogs/1.3.1.md new file mode 100644 index 000000000..c796d4b54 --- /dev/null +++ b/docs/changelogs/1.3.1.md @@ -0,0 +1,8 @@ +# Blitzkrieg 1.3.1 + +In this **minor update**, Blitzkrieg received several little **safety features** and **bug fixes**! + +- The bot is now more verbose + - Every time you use a command, the bot will now store data on what parameters you provided and if any errors were caused +- This update also eliminates the redundant usage of truthy type checking after API calls + - _Hopefully_ the bot let you know why it won't respond to you diff --git a/docs/changelogs/1.3.2.md b/docs/changelogs/1.3.2.md new file mode 100644 index 000000000..278a82a8c --- /dev/null +++ b/docs/changelogs/1.3.2.md @@ -0,0 +1,5 @@ +# Blitzkrieg 1.3.2 + +From now on, I **won't be pinging** the Blitzkrieg role for minor updates. Anyway, this **minor update** includes an optimization for `/today`. The tank icons on the left were fetched every time someone used the command. The bot now caches those images allowing for an instantaneous load. + +I noticed rendering times up to `3000ms` for rendering stats of about 10 tanks. Cached images should now be indifferent to this. diff --git a/docs/changelogs/1.3.3.md b/docs/changelogs/1.3.3.md new file mode 100644 index 000000000..6910991c6 --- /dev/null +++ b/docs/changelogs/1.3.3.md @@ -0,0 +1,8 @@ +# Blitzkrieg 1.3.3 + +This **minor update** fixes a few things :partying_face: + +- Rating battles now no longer count in `/today` + - This resolves the issue where some tanks had `NaN` stats +- Stats with the value of `-Infinity` are now ommited +- Images are not longer cached in `dev` `env` diff --git a/docs/changelogs/1.4.0.md b/docs/changelogs/1.4.0.md new file mode 100644 index 000000000..1b64b4015 --- /dev/null +++ b/docs/changelogs/1.4.0.md @@ -0,0 +1,28 @@ +# Blitzkrieg 1.4.0 + +A **few features** :star: and a **few much needed fixes** :wrench:! + +## Changes + +- Added an "today" row to `/today` which displays your overall statistics +- Gave `/tankstats` the new blitzkrieg look + - Also added "today", "60 days", and "career" stats +- Added a beta warning to generated images +- Updated the logo for match the new slate theme + - Canary versions now use the canary logo variant +- Added subtle polka dots to the background + +## Fixes + +- Rewrote `/stats` to precisely calculate stats on a per-tank basis + - This should stop the bot from hallucinating about stats + - This should also stop the bot from giving stats from like a week ago + - Also added "60 day" stats +- Tank autocomplete is now more human-tolerant just like username autocomplete +- Titlebar discriminators are now truncated on overflow + +## Technical Changes + +- The bot now uses `bepaint`, a library that I made that standardizes the color palette + - Also updated the logo to follow this +- Optimized how fonts are imported by fetching them all asynchronously diff --git a/docs/changelogs/1.4.1.md b/docs/changelogs/1.4.1.md new file mode 100644 index 000000000..d4247e55f --- /dev/null +++ b/docs/changelogs/1.4.1.md @@ -0,0 +1,3 @@ +# Blitzkrieg 1.4.1 + +A quick fix for the `/help` command not accepting the new theme colors. diff --git a/docs/changelogs/1.5.0.md b/docs/changelogs/1.5.0.md new file mode 100644 index 000000000..c050bb840 --- /dev/null +++ b/docs/changelogs/1.5.0.md @@ -0,0 +1,23 @@ +# Blitzkrieg 1.5.0 + +So so many **quality-of-life** changes and nasty **bug squashes**! + +## Changes + +- Added WN8 to `/today`, `/stats`, and `/tankstats` +- Added average tier to `/stats` and `/tankstats` + - Average tier in `/tankstats` is simply the tier of the tank that you are looking up +- Added an indicator of WN8 ranging from "very bad" (gray) to "super unicum" (purple) +- Replaced ellipses with simple clipping +- Added a "large image" warning to `/today` if displaying `6` or more tanks + +## Fixes + +- Removed random 0 that'd show up in `/today` where there was no difference between career and today's stats +- Added stricter checks for username autocomplete via a new REGEX pattern +- Fixed wonky ellipses that'd cut off usernames, tank names, and clan names unnecessarily +- Fixed the delta indicator showing up in battle counts + +## Technical Changes + +- Optimized and cleaned up tankopedia cache diff --git a/docs/changelogs/1.5.1.md b/docs/changelogs/1.5.1.md new file mode 100644 index 000000000..16dc0697a --- /dev/null +++ b/docs/changelogs/1.5.1.md @@ -0,0 +1,3 @@ +# Blitzkrieg 1.5.1 + +An emergency patch that fixes failed image caching. diff --git a/docs/changelogs/1.5.2.md b/docs/changelogs/1.5.2.md new file mode 100644 index 000000000..aa014cdfd --- /dev/null +++ b/docs/changelogs/1.5.2.md @@ -0,0 +1,14 @@ +# Blitzkrieg 1.5.2 + +Quite a few **bug fixes** with a **bunch more** on their way next update! + +## Fixes + +- Disabled image encoding as it seems to have broken in `1.5.0` and simply spams the console now +- `/stats` now ignores tanks that don't have any averages + - Tanks may not have averages registered in Blitz Stars because they are new or are in testing + - Take a look at \_34's testing tanks in the image below +- Fixed the "large image" prompt by simply removing the whole prompt + - _Kaboom? Yes Rico, kaboom._ +- `/today` now displays `--` when there is no WN8 to display + - This is unlike `/stats` which just shows 0 (this will be fixed soon) diff --git a/docs/changelogs/1.5.3.md b/docs/changelogs/1.5.3.md new file mode 100644 index 000000000..3eb151a8e --- /dev/null +++ b/docs/changelogs/1.5.3.md @@ -0,0 +1,10 @@ +# Blitzkrieg 1.5.3 + +Just a few more fixes that weren't that important so were deffered to this update. + +## Fixes + +- `/stats` now uses `--` just like `/today` when WN8 is not available +- Removed an unnecessary try/catch during the execution of a command +- Added error handling for an edge case where accounts with 0 battles were looked up + - This only applies to when `api/tanks/stats` is fetched; most other commands still need this fix diff --git a/docs/changelogs/1.5.4.md b/docs/changelogs/1.5.4.md new file mode 100644 index 000000000..8764e88de --- /dev/null +++ b/docs/changelogs/1.5.4.md @@ -0,0 +1,8 @@ +# Blitzkrieg 1.5.4 + +A last batch of fixes before the next update! + +## Fixes + +- Career WN8 in the `/today` command now accumulates the WN8 for all tanks instead of just the ones shown +- WN8 and average tiers are now displayed in `/stats` in the `career` period diff --git a/docs/changelogs/1.6.0.md b/docs/changelogs/1.6.0.md new file mode 100644 index 000000000..23ac06cc1 --- /dev/null +++ b/docs/changelogs/1.6.0.md @@ -0,0 +1,25 @@ +# Blitzkrieg 1.6.0 + +Spread the beauty! Spread the ease! + +## Features + +- Commands no longer require you to provide an username + - They are automatically inferred from your Discord nickname +- Re-implemented the `/eligible` command + - This command checks a player's eligibility for any of the Skilled clans + - This command is only available in the [Skilled](https://discord.gg/ZPvcEG7DS8) and [TresAbhi Discord](https://discord.gg/nDt7AjGJQH) servers +- Gave `/ownedtanks` and `/inactive` the new Blitzkrieg look +- Added "Powered by Wargaming" to commands where Blitz Stars is not utilized + +## Fixes + +- Removed image encoding all together + - As it turns out, encoding them in `base64` made rendering slower! +- Tank images in `/today` now don't make parent rows incorrectly taller +- Added a "No tanks found" when a player does not own tanks in a tier + +## Technical Changes + +- Added a mature error handling system + - Commands can now just `throw errorWithCause(...)` without caring about the error reporting to the user diff --git a/docs/changelogs/1.7.0.md b/docs/changelogs/1.7.0.md new file mode 100644 index 000000000..ff222fcce --- /dev/null +++ b/docs/changelogs/1.7.0.md @@ -0,0 +1,20 @@ +# Blitzkrieg 1.7.0 + +This is mostly a technical update to make migrating to cyclic.sh easier. + +## Changes + +- The bot's new deferred caching approach allows the bot to start up almost `4x` as fast + +## Technical Changes + +- Made numerous caches non-blocking + - Removed an unnecessary root-blocking await where fonts are imported + - Further improved performance by deferring font imports until after the declaration + - Tank averages and tankopedia are now declared fully empty only to be populated after a deferred fetch +- Reordered error handler, client login, and client event listener registration orders +- Removed `vite` all together + - This reduces bundle sizes + - To do this, a more primitive way of importing commands is used +- Removed the redundant usage of `args` to get the Discord token and Wargaming Application ID on each use +- Added a build script using `esbuild` diff --git a/docs/changelogs/1.7.1.md b/docs/changelogs/1.7.1.md new file mode 100644 index 000000000..eebfbed04 --- /dev/null +++ b/docs/changelogs/1.7.1.md @@ -0,0 +1,3 @@ +# Blitzkrieg 1.7.1 + +A hot fix to bring the bot back online with `vite-node`. diff --git a/docs/changelogs/1.7.2.md b/docs/changelogs/1.7.2.md new file mode 100644 index 000000000..b3df4c52c --- /dev/null +++ b/docs/changelogs/1.7.2.md @@ -0,0 +1,7 @@ +# Blitzkrieg 1.7.2 + +A quick, tiny, cute bug fix + +## Fixes + +- Tanks now once again show up in `/tankstats` diff --git a/docs/changelogs/1.7.3-1.7.4.md b/docs/changelogs/1.7.3-1.7.4.md new file mode 100644 index 000000000..a30e80707 --- /dev/null +++ b/docs/changelogs/1.7.3-1.7.4.md @@ -0,0 +1,3 @@ +# Blitzkrieg 1.7.3 & 1.7.4 + +These minor updates fix compatibility issues with cyclic. diff --git a/docs/changelogs/1.7.5.md b/docs/changelogs/1.7.5.md new file mode 100644 index 000000000..82ec63b40 --- /dev/null +++ b/docs/changelogs/1.7.5.md @@ -0,0 +1,11 @@ +# Blitzkrieg 1.7.5 + +This minor release aids the migration to build-based hosting. + +## Technical Changes + +- Removed `env` logging +- Fixed constant IDs and token naming conventions +- Moved `esbuild` to a `js` script +- Updated the workflow to use the latest binaries +- Added a `zip` command for `dist` diff --git a/docs/changelogs/1.7.6.md b/docs/changelogs/1.7.6.md new file mode 100644 index 000000000..a8a8402e2 --- /dev/null +++ b/docs/changelogs/1.7.6.md @@ -0,0 +1,14 @@ +# Blitzkrieg 1.7.6 + +Public service announcements and a few developer quality-of-life changes. + +## Changes + +- Added a PSA system + - Lets me create announcements without having to release a new update every single time +- Added fixed choices for tank stats instead of typing in numbers like before + +## Technical Changes + +- Command executions now return a payload and the executor now fully handles the interaction replies +- The build script now skips certain steps to speed up building time when building in dev mode diff --git a/docs/changelogs/1.7.7.md b/docs/changelogs/1.7.7.md new file mode 100644 index 000000000..acf0c1465 --- /dev/null +++ b/docs/changelogs/1.7.7.md @@ -0,0 +1,7 @@ +# Blitzkrieg 1.7.7 + +A tiny fix related to hosting. + +## Technical Changes + +- `index.cjs` is now run at root instead of `dist` diff --git a/docs/changelogs/1.8.0.md b/docs/changelogs/1.8.0.md new file mode 100644 index 000000000..00424dc95 --- /dev/null +++ b/docs/changelogs/1.8.0.md @@ -0,0 +1,26 @@ +# Blitzkrieg 1.8.0 + +A slick new command and new potentials unlocked. + +## Changes + +- Added `/ping` + - Allows you to see if the bot and Blitz are alive +- Added custom periods for `/stats` + - To do this, `/stats` received two sub command groups: `/stats player` and `/stats tank` (hence merging the two) + - All periods, including cusotm ones, now live as subcommands +- Added tier weights to `/stats` +- Added `/evolution` + - Shows your winrate and battles over a period + +## Fixes + +- `Infinity` and `NaN` values now show up as `--` in `/stats` +- WN8 shortcomings in `/eligible` now rounds to nearest integer +- Average tiers now, once again, show up in `/stats` + +## Technical Changes + +- Dev command names are implemented centrally in `interactionCreated` +- Abstracted the renderers of `/stats`, `/evolution`, and `/today` +- The bot now logs the number of server it's in on start up diff --git a/docs/changelogs/1.8.1.md b/docs/changelogs/1.8.1.md new file mode 100644 index 000000000..81fb06b9d --- /dev/null +++ b/docs/changelogs/1.8.1.md @@ -0,0 +1,7 @@ +# Blitzkrieg 1.8.1 + +A tiny oversight fixed. + +# Fixes + +- The min and max dates now show up in `/evolution` diff --git a/docs/changelogs/1.9.0.md b/docs/changelogs/1.9.0.md new file mode 100644 index 000000000..67f554fc9 --- /dev/null +++ b/docs/changelogs/1.9.0.md @@ -0,0 +1,32 @@ +# Blitzkrieg 1.9.0 + +The biggest, the baddest update yet! + +## Changes + +- Spiced up `/stats` with a graphics update + - This command now only shows a few of the stats as most of them were pretty pointless +- Renamed the old `/stats` to `/statsfull` +- Added embeds for `/stats` + - This is a URL that can be visited to load a "naked" variant of the command that auto-refreshes with the latest data every `60` seconds meant to be used the streamers +- Added refresh buttons to a few commands + - This lets you reuse a command on the click of a button +- Fixed many readibility issues with `/evolution` thanks to @heldenklage + +## Fixes + +- Fixed several type issues for compatibility with `express` + +## Technical Changes + +- Added a seperate `server.ts` from `bot.ts` + - Split builds appropriately +- Added the ability for routes to respond with svg counterparts of commands +- Cached `tankopedia.json` and `tankaverages.json` at build time + - This may be reverted in a minor release i favor of `Promise` +- Organized files as it was important to seperate the server and the bot code +- Split `resolvePeriod` and `resolvePlayer` for command, button, and express counterparts +- Switched a few instances of `Number(...)` to `parseInt(...)` and `parseLong(...)` +- Disabled canary commands for the public +- Merged `poweredBy` footers +- `dist` now ships with a `package.json` for Cyclic