andersthemagi / Sovereign-of-Chaos

A small-scale bot made in Python, capable of handling several D&D related tasks on Discord. Built using Discord.py and hosted on a Raspberry Pi.
MIT License
1 stars 0 forks source link

Leveling #4

Closed andersthemagi closed 3 years ago

andersthemagi commented 3 years ago

Feature Description

A robust leveling system that assigns roles to people based on their current level.

Desired Solutions

Maybe something like this? https://www.youtube.com/watch?v=pKkrCHnun0M

Considered Alternatives

N/A

Additional context

N/A

andersthemagi commented 3 years ago

Leveling has been implemented!

Read/Write to Remote SQL is a little slow (~2 to 5 secs per command), but there's not much to do on that. Might have to ask some experts at some point if there's a way I can speed that up at all.

andersthemagi commented 3 years ago

Turns out repl's DB is actually static, it was just that I was deleting my data every time I ran the bot myself during testing. Using that and it reduces the bot command latency drastically.

Some action items to properly close out this module for now.

andersthemagi commented 3 years ago

Code has been reorganized, commented, and streamlined slightly (changed from bubble sort for leaderboard to Python's built-in timsort algorithm). Should be able to close this out for real this time.

Famous last words...