Skip to content

Conversation

@brandons209
Copy link
Contributor

I extended the functionality of the shared functions for user profiles, allowing external cogs to get xp and level of users. I also added a new system to LevelUp that allows guild owners to setup dynamic command lock/unlock based on their level, as well as cooldowns for any command based on level. This is done by creating hooks and injecting them into RedBot that will check user's level and send appropriate error messages if they do not meet the level requirement for a command, or are on cooldown for a command based on their level.

@vertyco
Copy link
Owner

vertyco commented May 27, 2025

Please contact me in the 3rd party server to discuss this

@vertyco vertyco requested a review from Copilot June 7, 2025 01:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends the external API for user profiles and introduces dynamic level-based command cooldowns and unlocking.

  • Added get_xp and get_level methods to retrieve user XP and level.
  • Implemented new level and cooldown checks via a dedicated Checks class and integrated them into the bot's hook system.
  • Introduced a set of admin and user commands for managing command cooldowns, level requirements, and notification preferences.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
levelup/shared/profile.py Added get_xp and get_level methods for retrieving user XP and level.
levelup/shared/levelups.py Updated notification logic to respect user notification preferences.
levelup/shared/checks.py Introduced new Checks class for level and cooldown validations.
levelup/shared/init.py Integrated Checks into SharedFunctions.
levelup/main.py Registered and unregistered before_invoke hooks for new checks.
levelup/common/models.py Added new configuration fields for command cooldowns and bypass roles.
levelup/commands/user.py Added a toggle command for level up notifications and revised prestige logic.
levelup/commands/admin.py Added commands for managing bypass members/roles, level cooldowns, and requirements.
levelup/README.md Updated documentation with instructions for new commands and features.

@vertyco
Copy link
Owner

vertyco commented Jun 7, 2025

Hey, I took a look through the PR and it seems good, could you bump the minor version number since this is a big change? Its under the main cog constructor class.

@brandons209
Copy link
Contributor Author

Done

@vertyco vertyco merged commit 0389687 into vertyco:main Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants