[Cleanup]adds handling for messages cont. emojis/links #4483
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!4483
Loading…
Reference in a new issue
No description provided.
Delete branch "patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Description of the changes
[p]cleanup emoji[p]cleanup linkseach default to searching for 10 messages respectively
Blocked by #4728 (
[p]cleanup stickers)Have made this change on my own red, and can confirm no false positives as of yet on link or emoji clearing (unicode emojis of course are not purged). Initially I had an alias with `cleanup text ":" to sort of target either but couldn't settle for one or the other, and it would always clean both. This has been tested in a moderation environment where chat speed is variable of 1-2msgs per second with enforced slowmode of 30s (so you can imagine the spam, ads, emoji overuse encountered).
Just wanted to validate positive test to date and provide operational stroke of proposed addition, regardless if there is intent or desire for use.
Thanks!
This is not a review, I just had two things I wanted to mention. Feel free to ignore this until actual review comes up.
We have a regex for links in
redbot.core.utils.common_filters.URL_REwhich could be used here.Could you merge current
V3/developinto this branch so that these differences don't show up in this diff?applied the noted changes (i think)
let me know if that diff is fucky (git is confusing for me at times 😓 )
moved emoji regex to core and added unicode emoji regex extracting to core as well
Can revert if these properties are not sufficient for core otherwise.
making the unicode regex accessible could open up use cases in automod filters or further expanding cleanup functions.
I dont think this was intentional, this is the reason that
@checks.mod_or_permissions(manage_messages=True)isnt added to the group like you done in this PR. I dont know enough about this check to comment on why just something i saw when skimming through it.Looks to me like a merge that went south. The checks in cleanup cog were touched somewhat recently and this seems to be accidentally reverting it.
'Twas a revert to remove the diff from PR #4481 from @Predeactor as git was not attributing the correct blame. Thought reverting the commit of adding those and merging in would fix but ig not...
oh boi guise i'm unsure how to fix without closing and reopening with a with fresh V3/develop base 😟
Let me know if that's best course, and I'll dip this PR, burn the branch, base from current V3/develop, write in the changes, and open new PR.
Sorry! ha
successfully got the git blame back on track
Added support for cleanup stickers
Cause those were a fantastic idea and definitely not spammed :XtoDoubt:
Will discontinue pulling in base unless otherwise expressed this is a potential wanted merge. Just to save us all some email notifs 😅
will rectify a final updated upstream when/if that review is requested. Cheers!
Pull request closed