Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaderboard pooling multiple servers, break up into multiple leaderboards. #46

Open
coillteoir opened this issue Dec 12, 2023 · 3 comments
Labels
bot behaviour Changes to code which affect how the bot behaves bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@coillteoir
Copy link
Owner

Is your feature request related to a problem? Please describe.
The bot is currently being added to multiple servers, at the moment it is only designed for one server.

Describe the solution you'd like
The bot should create multiple leaderboard objects for each server it's in

Describe alternatives you've considered
Force the bot to only count good mornings from one server

Proposed Solution
Create a dictionary of leaderboards where the key is the ID of the server the bot is in. This involves changing the config and automating the process of creating leaderboards.

@coillteoir coillteoir added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers bot behaviour Changes to code which affect how the bot behaves labels Dec 12, 2023
@GuyKeogh
Copy link
Contributor

The best approach would be a database solution, rather than keeping all the data stored in-memory or on-disk. It'd be more maintainable and would be more persistent.

My approach where it'd stay simple would be to use the free version of MongoDB, and create Beanie models with the data that's needed. Creating, reading, and updating, would all be straightforward with this.

Let me know if you want this approach to be taken and I can throw together the solution.

@coillteoir
Copy link
Owner Author

coillteoir commented Dec 28, 2023

The only problem I have with this approach is scope creep. Although it would be a better solution than relying on the Python standard library for sure.
I do think it would be good in the long run for sure.

@coillteoir
Copy link
Owner Author

If you want to work on an implementation, please add the required steps to the docker build. I can help with this side of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot behaviour Changes to code which affect how the bot behaves bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants