-
Notifications
You must be signed in to change notification settings - Fork 25
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
I started making a level command :3 #559
Conversation
It's not useful but I hope its a good start :3
Reviewer's Guide by SourceryThis pull request introduces a new 'level' command as part of a leveling system. The implementation adds a new file 'levels.py' in the 'tux/cogs/fun/' directory, setting up the basic structure for a Levels cog in a Discord bot using the discord.py library. File-Level Changes
Tips
|
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 @AmilieCoding - I've reviewed your changes - here's some feedback:
Overall Comments:
- Good start on the level command structure. To make it functional, consider implementing actual level and exp tracking. Also, remove unused imports and variables (like 'client' and 'usermessages').
- Adding docstrings to the class and methods would improve code readability and help others understand the purpose and usage of this feature.
Here's what I looked at during the review
- 🟡 General issues: 3 issues 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 to tell me if it was helpful.
client = discord.Client | ||
|
||
|
||
usermessages = [] |
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.
suggestion: Remove unused global list 'usermessages'
This list is defined globally but never used in the code. It's best to remove unused variables to keep the code clean and prevent potential issues with global state.
usermessages = [] | |
# Remove the following line: | |
# usermessages = [] |
from tux.bot import Tux | ||
from tux.ui.embeds import EmbedCreator | ||
|
||
client = discord.Client |
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.
suggestion: Remove unused 'client' variable
This variable is assigning the Discord Client class to a variable, not instantiating it, and it's never used in the code. Consider removing it to improve code clarity.
client = discord.Client | |
# Remove the unused 'client' variable |
title="You are level level", | ||
description="Your have exp exp!", |
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.
suggestion: Implement actual level and exp calculation logic
The current implementation uses placeholder text for level and exp. Consider implementing the actual logic to calculate and display the user's level and experience points.
title=f"You are level {user_level}",
description=f"You have {user_exp} exp!",
It's not useful but I hope its a good start :3
Summary by Sourcery
Add a new 'level' command to the Discord bot, enabling users to view their current level and experience points through an embedded message.
New Features: