Hey
As promised I'd like to offer a few suggestions.
- As far as code organization goes, current separation of concerns is mainly constrained by highly horizontal dependency.
I think that separating lobby creation out into some sort of a builder and something to actually obtain required data would be a great start.
Long term this codebase could make use of simple dependency injection. This way you can make it much more flexible.
This can easily be done in Rust with Traits. That way you can easily redesign and add new code without having to modify previously written components.
It's easy to start here, even repeating code between modules if required to untangle unrelated things.
- Fixing a few critical issues:
Same with task scheduling via tokio. For example tokio::spawn
fails, the lobby being posted cannot be joined until the bot is restarted and critically doesn't seem to produce any errors to notify the user.
There are some Discord limitations that can cause issues. For example, options in select boxes are limited to 25, so with bigger guilds it can easily break lobby creation.
You can make changes to characters belonging to someone else.
-
Messages visibility and limits:
Currently commands are largely public with their output. For example, lobby creation is needlessly visible for everyone even before being posted.
-
Certain things are outdated
I'm sure you know that already, but ilvls are limited to 1490, which you can pass in the current version of the game. Classes are missing the latest addition too. This can and will prevent people from trying to use this the most.
-
The choice of using .embed
Some people have embeds disabled. So for them, each message is just a few buttons with no text or images.
I don't have much time to code features here for now, but I do intend to contribute in the future. It's a solid foundation for a bot.