Skip to content

Conversation

@Atmois
Copy link
Contributor

@Atmois Atmois commented Sep 20, 2024

Description

Implements levelling system, allows configuration of blacklisted channels and mutlipliers & level role rewards in settings.yml.

New commands: xpset levelset xpblacklist xp xpreset
xplacklist is toggleable bool to make user unable to gain xp
xpreset sets level and xp to 0
xpset and levelset update the relevant value and change the other to the appropiate amount

New db model "levels" to store all the new data into the db

New service levels.py to increment xp on message send

Checks to ensure that inputs are valid

Guidelines

  • My code follows the style guidelines of this project (formatted with Ruff)

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if needed

  • My changes generate no new warnings

  • I have tested this change

  • Any dependent changes have been merged and published in downstream modules

  • I have added all appropriate labels to this PR

  • I have followed all of these guidelines.

How Has This Been Tested? (if applicable)

Tested extensivly in ATL Dev sandbox

Screenshots (if applicable)

n/a

Additional Information

thanks to @AmilieCoding for some coding contributions and @wlinator and @kzndotsh for improvements for a PR and all the contributors for input on how to implement and help on testing this!

AmilieCoding and others added 2 commits September 20, 2024 16:50
It's not useful but I hope its a good start :3
I started making a level command :3
Atmois and others added 23 commits October 3, 2024 20:45
…del to better reflect its purpose and improve code readability
This new class listens for messages and processes XP gain and level up. It also checks if the message is from a bot, if the message is from a blacklisted channel, or if the message starts with a prefix. If any of these conditions are met, the function returns without processing XP.
refactor(levelset.py): replace user with member for consistency and clarity

refactor(xpblacklist.py): replace user with member for consistency and clarity

refactor(xpreset.py): replace user with member for consistency and clarity

refactor(xpset.py): replace user with member for consistency and clarity
@ghost ghost marked this pull request as ready for review October 4, 2024 11:22
@sourcery-ai

This comment was marked as duplicate.

sourcery-ai[bot]

This comment was marked as resolved.

…fault behavior when no member is provided

feat(levels.py): consolidate level management commands into a single cog for better organization and maintainability

refactor(levels.py): remove redundant files and integrate functionality into levels cog

fix(levels.py): correct string formatting in logger debug statement

style(help.py): remove unnecessary punctuation in help command aliases field for consistency
@kzndotsh kzndotsh merged commit a45f870 into main Oct 4, 2024
@kzndotsh kzndotsh deleted the levels branch October 4, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

levelling system for perms

3 participants