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

Implement Automod Features #1316

Merged
merged 68 commits into from
Jul 4, 2022
Merged

Conversation

plun1331
Copy link
Member

@plun1331 plun1331 commented May 3, 2022

Summary

Implements some automod features

Based on discord/discord-api-docs#4873 (that's all there is)
Noticed a new PR with more information, discord/discord-api-docs#4860

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...)

@plun1331 plun1331 added the feature Implements a feature label May 3, 2022
@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #1316 (7fc0fda) into master (44eb9a0) will increase coverage by 0.01%.
The diff coverage is 75.00%.

❗ Current head 7fc0fda differs from pull request most recent head 14af3cb. Consider uploading reports for the commit 14af3cb to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1316      +/-   ##
==========================================
+ Coverage   33.42%   33.43%   +0.01%     
==========================================
  Files          93       93              
  Lines       17606    17612       +6     
==========================================
+ Hits         5885     5889       +4     
- Misses      11721    11723       +2     
Flag Coverage Δ
pytest 33.43% <75.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/guild.py 24.31% <ø> (ø)
discord/enums.py 78.32% <66.66%> (-0.14%) ⬇️
discord/types/embed.py 100.00% <100.00%> (ø)
discord/types/message.py 98.83% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44eb9a0...14af3cb. Read the comment docs.

@plun1331 plun1331 added the status: in progress Work in Progess label May 4, 2022
@krittick krittick modified the milestones: v2.0, v2.1 May 6, 2022
@krittick krittick added discord limitation Limitation imposed by discord priority: high High Priority Merge with squash upcoming discord feature Involves a feature not yet fully released by Discord and removed discord limitation Limitation imposed by discord labels May 6, 2022
@ghost
Copy link

ghost commented May 11, 2022

Suggesting an on_automod_alert event that allows for custom automod alerts, logging or auto-mute if it meets a certain rule

@plun1331
Copy link
Member Author

Suggesting an on_automod_alert event that allows for custom automod alerts, logging or auto-mute if it meets a certain rule

Such an event would have to be implemented into the Discord gateway for bots to receive, so it's up to Discord to make that possible.
Discord already handles logging and blocking messages for you as well.

@Lulalaby Lulalaby enabled auto-merge (squash) June 20, 2022 21:06
Copy link
Member

@Middledot Middledot left a comment

Choose a reason for hiding this comment

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

The enums and new AuditLogActions should be documented too

discord/automod.py Show resolved Hide resolved
discord/automod.py Outdated Show resolved Hide resolved
Lulalaby
Lulalaby previously approved these changes Jul 2, 2022
Lulalaby and others added 2 commits July 2, 2022 13:27
Co-authored-by: Middledot <78228142+Middledot@users.noreply.github.com>
@Lulalaby Lulalaby merged commit d0d7451 into Pycord-Development:master Jul 4, 2022
@Dorukyum Dorukyum modified the milestones: v2.1, v2.0 Jul 4, 2022
@JustaSqu1d JustaSqu1d mentioned this pull request Jan 5, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature priority: high High Priority status: awaiting review Awaiting review from a maintainer upcoming discord feature Involves a feature not yet fully released by Discord
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants