[Cleanup]adds handling for messages cont. emojis/links #4483

Closed
kablekompany wants to merge 28 commits from patch-1 into V3/develop
kablekompany commented 2020-10-12 06:58:41 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

[p]cleanup emoji
[p]cleanup links

each default to searching for 10 messages respectively

Blocked by #4728 ([p]cleanup stickers)

### Type - [ ] Bugfix - [ ] Enhancement - [x] New feature ### Description of the changes `[p]cleanup emoji` `[p]cleanup links` each default to searching for 10 messages respectively Blocked by #4728 (`[p]cleanup stickers`)
aikaterna (Migrated from github.com) reviewed 2020-10-12 06:58:41 +02:00
kablekompany commented 2020-10-14 01:16:09 +02:00 (Migrated from github.com)

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!

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!
Jackenmen (Migrated from github.com) reviewed 2020-10-19 15:11:21 +02:00
Jackenmen (Migrated from github.com) left a comment

This is not a review, I just had two things I wanted to mention. Feel free to ignore this until actual review comes up.

This is not a review, I just had two things I wanted to mention. Feel free to ignore this until actual review comes up.
Jackenmen (Migrated from github.com) commented 2020-10-19 15:08:46 +02:00

We have a regex for links in redbot.core.utils.common_filters.URL_RE which could be used here.

We have a regex for links in `redbot.core.utils.common_filters.URL_RE` which could be used here.
Jackenmen (Migrated from github.com) commented 2020-10-19 15:11:17 +02:00

Could you merge current V3/develop into this branch so that these differences don't show up in this diff?

Could you merge current `V3/develop` into this branch so that these differences don't show up in this diff?
kablekompany commented 2020-10-23 04:34:17 +02:00 (Migrated from github.com)

applied the noted changes (i think)
let me know if that diff is fucky (git is confusing for me at times 😓 )

applied the noted changes (i think) let me know if that diff is fucky (git is confusing for me at times 😓 )
kablekompany commented 2020-10-28 23:14:22 +01:00 (Migrated from github.com)

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.

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.
Drapersniper (Migrated from github.com) reviewed 2020-10-28 23:31:42 +01:00
Drapersniper (Migrated from github.com) commented 2020-10-28 23:31:42 +01:00

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.

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.
Jackenmen (Migrated from github.com) reviewed 2020-10-28 23:33:41 +01:00
Jackenmen (Migrated from github.com) commented 2020-10-28 23:33:41 +01:00

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.

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.
kablekompany (Migrated from github.com) reviewed 2020-10-29 03:04:22 +01:00
kablekompany (Migrated from github.com) commented 2020-10-29 03:04:22 +01:00

'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 😟

'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 😟
kablekompany (Migrated from github.com) reviewed 2020-10-29 03:14:03 +01:00
kablekompany (Migrated from github.com) commented 2020-10-29 03:14:03 +01:00

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

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
kablekompany commented 2020-10-30 08:37:28 +01:00 (Migrated from github.com)

successfully got the git blame back on track

successfully got the git blame back on track
kablekompany commented 2020-12-29 05:13:21 +01:00 (Migrated from github.com)

Added support for cleanup stickers

Cause those were a fantastic idea and definitely not spammed :XtoDoubt:

Added support for cleanup stickers Cause those were a fantastic idea and definitely not spammed :XtoDoubt:
kablekompany commented 2021-01-28 23:25:48 +01:00 (Migrated from github.com)

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!

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

Sign in to join this conversation.
No reviewers
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!4483
No description provided.