During the initial planning phase, this project was planned to be using Python and the interactions.py library. However, due to a few hiccups with the libraries, esp. around interactions.py, we have lost a lot of morale in the project. Time was spent mostly on fixing the bugs with the tools and not creating a meaningful experience.
The discord.js library is more actively maintained than interactions.py
Documentations of discord.js is a lot more detailed in what we need to do in deploying guild-specific things vs global. This was severely lacking in interactions.py.
Writing tests proved difficult because of the annotations syntax being used in the library itself.
Caveats
However, this decision also comes with caveats:
Python is not removed completely from the project, as it is still used to run the LiteLLM Proxy. This might proven to be tricky to use devcontainers.
In NodeJS, there isn't a native GDrive downloader like gdown, so I had to write up a module manually.
What was done
Ported the project to TypeScript using the robust toolset:
What this is
During the initial planning phase, this project was planned to be using Python and the
interactions.py
library. However, due to a few hiccups with the libraries, esp. aroundinteractions.py
, we have lost a lot of morale in the project. Time was spent mostly on fixing the bugs with the tools and not creating a meaningful experience.This is why I took the time to make a porting attempt of this project into TypeScript, using the bootstrapping template at
samhwang/ts-starter-template
and a similar structure toviet-aus-it/vait-discord-bot
.Why this PR was made
The decision was made on a few key points:
discord.js
library is more actively maintained thaninteractions.py
discord.js
is a lot more detailed in what we need to do in deploying guild-specific things vs global. This was severely lacking ininteractions.py
.Caveats
However, this decision also comes with caveats:
gdown
, so I had to write up a module manually.What was done
vitest
Test runnertsup
TypeScript Bundlertsx
CLI tool to run TypeScript files locallybiome
Linter & Formatterzod
Schema validationsrc/discord_bot
is now split up into 3:src/discord
for discord related utilitiessrc/slash-commands
for all slash commandssrc/autocompletes
for all autocompletesI understand this PR maybe wieldy to look at in just the changed files. Please take a look at the branch as a whole.