Skip to content
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

[Prefix] Add Check to PrefixConverter to Prevent / Prefixes #37

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

mellow-org
Copy link
Contributor

@mellow-org mellow-org commented Aug 20, 2024

Prefixes cannot start with a slash (/) because it raises a ValueError, indicating a conflict with Discord slash commands. This check has been added to the converter to prevent the issue.

Summary by Sourcery

Prevent prefixes from starting with a slash in the PrefixConverter to avoid conflicts with Discord slash commands and update the version of the Prefix management cog.

Bug Fixes:

  • Add a check in the PrefixConverter to prevent prefixes from starting with a slash ('/'), which raises a ValueError due to conflicts with Discord slash commands.

Enhancements:

  • Update the version of the Prefix management cog from 1.0.4 to 1.0.5.

Copy link
Contributor

sourcery-ai bot commented Aug 20, 2024

Reviewer's Guide by Sourcery

This pull request adds a new check to the PrefixConverter class to prevent prefixes that start with a forward slash (/). The change is implemented by adding a conditional statement in the convert method of the PrefixConverter class. Additionally, the version number of the Prefix cog has been updated.

File-Level Changes

Files Changes
prefix/converters.py Added a new check in the PrefixConverter's convert method to raise a BadArgument if the prefix starts with a slash
prefix/prefix.py Updated the version number of the Prefix cog from 1.0.4 to 1.0.5

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @mellow-org - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@sravan1946
Copy link
Owner

LGTM, could you run pre-commit on it @mellow-org

@mellow-org
Copy link
Contributor Author

Done! @sravan1946

@sravan1946 sravan1946 merged commit 4960010 into sravan1946:master Aug 20, 2024
1 check passed
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