Typescripted & More
So a bit ago i decided to do a complete rework of my Discord Bot to convert it from JavaScript to TypeScript to reduce the amount of issues with it as well as implement proper slash commands and a better module system to support slash commands.
Modules can still be made in JS with a more crude module format that won't support as many features. I have plans to redo the module system a bit more where I only have one listener for each type of events and it gets dispatched by my code but that’s for later because I still want to add a few more features and base included modules.
Aswell maybe extracting and cleaning up the link cleanup function into a separate NPM library people could use and configure?
Overall converting to TypeScript was well worth the effort (along with implementing slash commands). TypeScript is not too hard to get used to, and it makes things way easier to code with having IDE hints in KATE at least
Slash commands are well slash commands, and they do their job and are nicer to work with for argument validation but
fall flat for some commands, so I still have some normal text commands for !repost as the slash command version cannot
properly handle images and text with new lines and no \n does not work here by default and would be too obtuse for most
users because the text box is so small
I am planning on implementing the following features soon™
- Logging of deleted & edited messages (Will hopefully be setup to ignore messages deleted and reposed by bots even with minor changes like with the link cleanup module)
- Giving roles on certain level milestones
- Configuration of XP gain multiplier (0.1x to 10x perhaps. Default: 1x)
- Configuration of XP decay (if you say you are inactive for a week or more you could lose some XP? Default: Off)