8000 [LevelUp] Extend external API and add dynamic command cooldown and unlocking based on level by brandons209 · Pull Request #231 · vertyco/vrt-cogs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[LevelUp] Extend external API and add dynamic command cooldown and unlocking based on level #231

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

brandons209
Copy link

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
@Copilot 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 and others added 2 commits June 6, 2025 21:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@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
Author

Done

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
0