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

Update guild.py (automod things) #76

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Update guild.py (automod things) #76

merged 1 commit into from
Mar 5, 2024

Conversation

The-LukeZ
Copy link

@The-LukeZ The-LukeZ commented Feb 24, 2024

Fixed issues with create_automod_rule and added fetch_automod_rule (to fetch a single rule)

Fixed issues with create_automod_rule and added fetch_automod_rule


Signed-off-by: LukeZ <117578407+LukeZNotFound@users.noreply.github.com>
@The-LukeZ The-LukeZ marked this pull request as ready for review February 24, 2024 21:51
Copy link

@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.

PR Type: Enhancement

PR Summary: This pull request introduces enhancements to the discord/guild.py module by fixing issues with the existing create_automod_rule function and adding a new function, fetch_automod_rule, to fetch a single Auto Moderation rule by its ID. The changes aim to improve the functionality and flexibility of handling Auto Moderation rules within a guild.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Ensure that the newly introduced fetch_automod_rule function is thoroughly tested, especially in scenarios where the rule ID does not exist or the user lacks the necessary permissions.
  • Consider adding more detailed documentation or examples on how the fetch_automod_rule and create_automod_rule functions can be used in conjunction, to provide users with a clearer understanding of their capabilities.
  • Review the changes made to the create_automod_rule function, particularly the handling of event_type and trigger_type parameters, to ensure they align with the intended design and do not introduce any regressions.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

async def fetch_automod_rule(self, rule_id: int) -> AutoModRule:
"""|coro|

Fetches a Auto Moderation rule for this guild by their ID
Copy link

Choose a reason for hiding this comment

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

nitpick (llm): There's a minor grammatical error in the documentation. It should be 'Fetches an Auto Moderation rule for this guild by its ID' instead of 'Fetches a Auto Moderation rule for this guild by their ID'.

@mccoderpy mccoderpy linked an issue Feb 26, 2024 that may be closed by this pull request
@mccoderpy mccoderpy merged commit 2c66204 into mccoderpy:developer Mar 5, 2024
3 checks 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.

[Bug]: AutoMod rule fails to create
2 participants