| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
| |
Co-authored-by: wookie184 <[email protected]>
|
| |
|
|
| |
Co-authored-by: decorator-factory <[email protected]>
|
| |
|
|
| |
Co-authored-by: wookie184 <[email protected]>
|
| |
|
|
| |
Co-authored-by: decorator-factory <[email protected]>
|
| |
|
|
|
|
|
| |
Keeps the type hint accurate in the subclasses, and avoids having type guards for each implementation.
Co-authored-by: decorator-factory <[email protected]>
Co-authored-by: Ionite <[email protected]>
|
| |
|
|
| |
Co-authored-by: Ionite <[email protected]>
|
| |
|
|
| |
Co-authored-by: Ionite <[email protected]>
|
| |
|
|
| |
Co-authored-by: Ionite <[email protected]>
|
| | |
|
| | |
|
| |
|
|
| |
The information is necessary for the serializer validaiton.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
If an offending message is sent in DMs, infractions that require the user being on the server didn't work, and there was an error while trying to display the user embed from that object, since the user is on the server (and therefore should have a nick attribute).
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This also increases the cache size to increase the chances of ignoring filters. Since it's newest first and the antispam uses take_while, it doesn't slow down the antispam.
|
| | |
|
| |
|
|
|
|
|
|
| |
The view provides info about the offending user.
This change required changing the cog to generate a fresh webhook on startup so that it's authenticated to the bot.
Only webhooks authenticated to the bot can send message components.
In the future, this view might be used for more advanced usages such as having a button to pardon the user.
|
| |
|
|
| |
A shortcut command to autoban a compromised account if it posts a given content.
|
| |
|
|
|
| |
With the new system, some custom actions might be applied if any filters are triggered, for example message deletion or infraction.
Those actions will be applied in the context of the command invocation.
|
| |
|
|
|
|
| |
This is mostly a copy-paste from the old system.
If there are any actions taken against the message, but deleting is not one of them - schedule the message for deletion after 7 days.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
- 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)
|
| |
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |\ |
|
| | |\
| | |
| | | |
Move Security cog to backend extension
|
| | |/ |
|