aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Add nickname filterGravatar mbaruh2022-11-25-60/+176
| | | | | | | | | | | | | | | | The nickname filter works in much the same way as the one in the old system, with the following changes: - The lock is per user, rather than a global lock. - The alert cooldown is one hour, instead of three days which seemed too much. The delete_messages setting was changed to the more generic remove_context. If it's a nickname event, the context will be removed by applying a superstar infraction to the user. In order to allow filtering nicknames in voice state events, the filter context can now have None in the channel field. Additionally: - Fixes a bug when ignoring filters in message edits. - Makes the invites list keep track of message edits. - The FakeContext class is moved to utils since it's now also needed by remove_context.
* Add message edit filteringGravatar mbaruh2022-11-05-28/+87
| | | | | | This edit handler takes into account filters already triggered for the message and ignores them (as long as it's a denied type) To that end the message cache can now hold metadata to accompany each message in the cache.
* Handle threads in channel_scopeGravatar mbaruh2022-11-05-0/+2
|
* Bring back auto-infraction reportingGravatar mbaruh2022-11-05-5/+122
| | | | | - When a filter is set to infract, it will send a message in #filter-log (See PR #1893) - Once a week the cog will send a message of all auto-infractions sent in the last 7 days, with a way to trigger it manually (See PR #2267)
* Edit description on filter add/edit, bug fixesGravatar mbaruh2022-11-04-29/+45
| | | | | | | | `process_content` was changed to `process_input` to also edit the description when necessary. Fixes unhandled filter_type being None on filter add/edit. Moves the missing filter type warning to a more appropriate location to not trigger during filter add/edit.
* Filter match now shows all triggers instead of messagesGravatar mbaruh2022-11-04-41/+67
| | | | | | | | The purpose of this command is to be able to find any relevant filters. It was not possible to find whitelist filters in the previous method, as there are no alerts for whitelist triggers. Instead, each filterlist now additionally returns what filters were triggered while processing the context. Additionally, a `no_user` argument was added to `filter match` to allow checking for triggers on one's own messages (otherwise there's almost no filtering on a mod's messages).
* Stop using None as a valid setting valueGravatar mbaruh2022-11-04-36/+29
| | | | | A None value signifies that there's no override, and it shouldn't be used for anything else. Doing so is confusing and bug-prone.
* Remove old filtering constantsGravatar mbaruh2022-11-01-133/+0
|
* Prettify f and fl describe outputGravatar mbaruh2022-11-01-6/+8
|
* Fix argument completion for al and blGravatar mbaruh2022-11-01-8/+10
|
* Add the rest of the antispam rulesGravatar mbaruh2022-11-01-35/+468
| | | | | This is mostly a copy-paste of the implementations in the old system into the new system's structure. The mentions rule required changing the `triggers_on` method to async.
* Add antispam filter list and duplicates filterGravatar mbaruh2022-10-31-141/+479
| | | | | | | | | Adds the antispam filterlist, which dispatches a set of messages sent in the last X seconds to its filters. Unlike other filter lists, it doesn't just return the actions to be taken, but rather splits them in two: any actions unrelated to alerting mods are returned as usual, while actions related to alerting are used in a delayed coroutine, from which the alert is sent. - Fixes `infraction_channel` not using the context channel when it's None. - Moves the `upload_log` function outside the ModLog cog, as it only needed it for the bot instance. - Any auto-deleted message with attachments will now have its attachments logged.
* Handle context message possibly being NoneGravatar mbaruh2022-10-28-18/+19
|
* Use command prefix instead of hardcoded !Gravatar mbaruh2022-10-27-3/+7
|
* Convert redundant filter setting group to commandGravatar mbaruh2022-10-27-14/+9
|
* Suppress exceptions while actioning filtersGravatar mbaruh2022-10-27-7/+20
| | | | | | | | Filtering should not stop even if one type of action raised an exception. For example, if deleting the message raised somehow, it should still try to infract the user. Exceptions raised in actions are logged instead. Additionally adds a fix to the way actions are merged.
* Add Discord token filterGravatar mbaruh2022-10-26-35/+255
| | | | | | Also fix a bug with the cog trying to serialize a set when trying to modify the DB with no UI. Also fix a bug with the domain setting description having a mismatching name.
* Add rich embed filterGravatar mbaruh2022-10-23-19/+62
|
* Merge branch 'main' into new-filtersGravatar mbaruh2022-10-23-609/+1142
|\
| * Merge pull request #2308 from python-discord/move_security_cogGravatar wookie1842022-10-23-1/+1
| |\ | | | | | | Move Security cog to backend extension
| | * Move Security cog to backend extensionGravatar mbaruh2022-10-22-1/+1
| |/
| * Merge pull request #2298 from shtlrs/issue-2294-zen-commandGravatar wookie1842022-10-20-10/+17
| |\ | | | | | | change the signature to include a "zen_rule_index"
| | * remove int from search_value's type unionGravatar Amrou Bellalouna2022-10-20-6/+6
| | |
| | * apply style guidelines to signatureGravatar Amrou Bellalouna2022-10-20-2/+7
| | |
| | * update doc strings to reflect the usage of the new paramGravatar Amrou Bellalouna2022-10-20-2/+2
| | |
| | * change the signature to include a "zen_rule_index"Gravatar Amrou Bellalouna2022-10-20-7/+9
| |/
| * Merge pull request #2245 from python-discord/update-autoreview-systemGravatar wookie1842022-10-19-85/+385
| |\ | | | | | | Update autoreview system
| | * Calculate 'now' once to ensure it is constant for scoring nominationsGravatar wookie1842022-10-19-4/+5
| | |
| | * Merge branch 'main' into update-autoreview-systemGravatar wookie1842022-10-19-671/+1062
| | |\ | | |/ | |/|
| * | Merge pull request #2296 from ↵Gravatar ChrisJL2022-10-18-1/+1
| |\ \ | | | | | | | | | | | | python-discord/lemon/resolve-serious-grammatical-problem
| | * | Resolve a serious grammatical problem in a commentGravatar Leon Sandøy2022-10-18-1/+1
| |/ / | | | | | | | | | A controversial comment, to be sure. I have solved this with a compromise I know in my heart we can all agree on, wholeassedly.
| * | Merge pull request #2274 from python-discord/fix-silence-and-tags-when-unloadedGravatar Boris Muratov2022-10-18-1/+9
| |\ \ | | | | | | | | Check for commands being None in try_get_tag and try_silence
| | * \ Merge branch 'main' into fix-silence-and-tags-when-unloadedGravatar Boris Muratov2022-10-18-444/+1955
| | |\ \ | | |/ / | |/| |
| * | | Merge pull request #2283 from ↵Gravatar Boris Muratov2022-10-18-2/+22
| |\ \ \ | | | | | | | | | | | | | | | | | | | | shtlrs/1379-tranform-urls-upon-rich-embed-filter-application 1379 tranform urls upon rich embed filter application
| | * \ \ Merge branch 'main' into 1379-tranform-urls-upon-rich-embed-filter-applicationGravatar Boris Muratov2022-10-18-250/+1578
| | |\ \ \ | | |/ / / | |/| | |
| * | | | Merge pull request #2293 from python-discord/fix-sequency-proxy-breaking-changeGravatar mina2022-10-17-1/+2
| |\ \ \ \
| | * | | | Support the new SequenceProxy type in d.pyGravatar Chris Lovering2022-10-17-1/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | This type is usd for a few attributes, including Guild.threads and guild.Channels. This type does not implement any of the add dunder methods, so we use itertools.chain to get a single iterator for both sequences. Fixes BOT-398 Fixees #2292
| * | | | Merge pull request #2287 from python-discord/bump-bot-coreGravatar Boris Muratov2022-10-16-233/+1358
| |\ \ \ \ | | | | | | | | | | | | Bump bot-core to 8.2.1 and bump other deps to latest
| | * \ \ \ Merge branch 'main' into bump-bot-coreGravatar Boris Muratov2022-10-16-6/+5
| | |\ \ \ \ | | |/ / / / | |/| | | |
| * | | | | enhancement(filters): use a stricter bot token regex (#2006)Gravatar arl2022-10-14-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a stricter bot token regex Co-authored-by: wookie184 <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]>
| * | | | | `REPO_TOKEN` is no more. (#2289)Gravatar Xithrius2022-10-13-1/+0
| | | | | |
| | * | | | Use explicit mock channels in tests to remove warningGravatar Chris Lovering2022-10-10-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is need due to the new behaviour of discord.utils.get supporting both iterables and async iterables by checking for the presence of the __aiter__ attr on the iterable. GuildChannelConverter._resolve_channel uses this get util under the hood which grabs the voice channels on the guild, which were previously Mocked by the MagicMock, meaning the __aiter__ attr was present, causing the util to think it should be ran asynchronously.
| | * | | | noqa an abstract class with no abstract methodsGravatar Chris Lovering2022-10-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This warning was added in the latest version of flake8-bugbear, but can be ignored in this instance.
| | * | | | Bump all deps to latestGravatar Chris Lovering2022-10-10-498/+426
| | | | | |
| | * | | | Bump bot-core to 8.2.1Gravatar Chris Lovering2022-10-10-152/+1340
| |/ / / / | | | | | | | | | | | | | | | From the release notes on d.py [here](https://canary.discord.com/channels/336642139381301249/381965829857738772/1006359073610010664) and [here](https://canary.discord.com/channels/336642139381301249/381965829857738772/1008772795179737230) none of the breaking changes for the commit we were on to 2.0.1 affect us.
| * | | | Merge pull request #1917 from mathstrains21/patreonGravatar wookie1842022-10-05-0/+138
| |\ \ \ \ | | | | | | | | | | | | Add Patreon Cog
| | * \ \ \ Merge branch 'main' into patreonGravatar wookie1842022-10-05-261/+563
| | |\ \ \ \ | | |/ / / / | |/| | | |
| * | | | | Merge pull request #2284 from shtlrs/2281-fix-non-awaited-remove-cog-callsGravatar wookie1842022-10-05-3/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | Fix all non-awaited bot.remove_cog calls
| | * \ \ \ \ Merge branch 'main' into 2281-fix-non-awaited-remove-cog-callsGravatar wookie1842022-10-05-7/+72
| | |\ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | Merge pull request #2267 from python-discord/move-filter-alertsGravatar ChrisJL2022-10-03-7/+72
| |\ \ \ \ \ \