-
-
Notifications
You must be signed in to change notification settings - Fork 29
feat: add extensions system and update README #828
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
Conversation
Merging to
|
Reviewer's Guide by SourceryThis pull request introduces an extensions system that allows users to add custom cogs to the bot without modifying the core code. It also updates the README to include information about the new extensions system. Sequence diagram for loading cogs with extensionssequenceDiagram
participant cog_loader
participant bot
cog_loader->>cog_loader: load_cogs_from_folder(folder_name="cogs")
activate cog_loader
cog_loader->>bot: Load cogs from cogs folder
deactivate cog_loader
cog_loader->>cog_loader: load_cogs_from_folder(folder_name="extensions")
activate cog_loader
cog_loader->>bot: Load cogs from extensions folder
deactivate cog_loader
Updated class diagram for CogLoaderclassDiagram
class CogLoader {
+load_cogs_from_folder(folder_name: str)
}
note for CogLoader "CogLoader now loads cogs from the extensions folder in addition to the cogs folder."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @electron271 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a check to ensure the 'extensions' folder exists before attempting to load cogs from it.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Description
Adds a gitignored folder called tux/extensions/ where people can easily add custom cogs (even submodule them!)
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)
Added the file from #720 into the folder and also tested it in a subdirectory
Screenshots (if applicable)
Please add screenshots to help explain your changes.
Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Implement an extensions system for Tux, allowing users to add custom cogs easily without modifying the core bot code
New Features:
Enhancements:
Documentation: