aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | | | | Fix imports in converters.pyGravatar Leon Sandøy2020-07-29-5/+6
| | | | | | | | |
| | * | | | | | | Refactor filtering: use non-compiled expressions.Gravatar Leon Sandøy2020-07-29-10/+6
| | | | | | | | |
| | * | | | | | | Make a helper for validating guild invites.Gravatar Leon Sandøy2020-07-29-16/+18
| | | | | | | | |
| | * | | | | | | Make a helper for inserting filter lists.Gravatar Leon Sandøy2020-07-29-21/+16
| | | | | | | | |
| | * | | | | | | Kaizen - group private methods together.Gravatar Leon Sandøy2020-07-29-43/+43
| | | | | | | | |
| | * | | | | | | Use a defaultdict(list) for filter_list_cache.Gravatar Leon Sandøy2020-07-29-6/+7
| | | | | | | | |
| | * | | | | | | Expect status 400 for duplicates.Gravatar Leon Sandøy2020-07-29-2/+2
| | | | | | | | |
| | * | | | | | | Bump flake8 version to 3.8Gravatar Leon Sandøy2020-07-27-173/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary to support walrus operators.
| | * | | | | | | Rename AllowDenyList to FilterListsGravatar Leon Sandøy2020-07-27-45/+45
| | | | | | | | |
| | * | | | | | | More explicit dict indexing Gravatar Leon Sandøy2020-07-24-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses reviews from MarkKoz Co-authored-by: Mark <[email protected]>
| | * | | | | | | Add sanity to partner and verification check in filtering.py.Gravatar Leon Sandøy2020-07-24-2/+2
| | | | | | | | |
| | * | | | | | | No need for all() in cog_check for AllowDenyLists.Gravatar Leon Sandøy2020-07-24-4/+1
| | | | | | | | |
| | * | | | | | | Put valid_types_list inside the conditional.Gravatar Leon Sandøy2020-07-24-1/+1
| | | | | | | | |
| | * | | | | | | Catch ResponseCodeError in the ValidAllowDenyListType converter.Gravatar Leon Sandøy2020-07-24-7/+7
| | | | | | | | |
| | * | | | | | | Implement new guild invite filtering logic.Gravatar Leon Sandøy2020-07-19-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now filter guild invites the following way: - Whitelisted invites are always permitted. - Blacklisted invites are never permitted. - If the invite is not blacklisted, it is permitted only if it is a Verified or a Partnered server, otherwise not. This strategy was decided on during the June 7th staff meeting, see https://github.com/python-discord/organisation/issues/261
| | * | | | | | | Validation of guild invites for delete.Gravatar Leon Sandøy2020-07-19-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to support deletion of both IDs and guild invites, so we need a bit of special handling for that.
| | * | | | | | | Validation of guild invites.Gravatar Leon Sandøy2020-07-19-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will now validate and convert any standard discord server invite to a guild ID, and automatically add the name of the server as a comment. This will ensure that the list of whitelisted guild IDs will be readable and nice. This also makes minor changes to list output aesthetics.
| | * | | | | | | Support the new AllowDenyList field, 'comment'.Gravatar Leon Sandøy2020-07-19-10/+46
| | | | | | | | |
| | * | | | | | | Include the guild ID in mod-log embed.Gravatar Leon Sandøy2020-07-19-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives easier access to the Guild ID in the place where you're most likely to want to use the whitelist command.
| | * | | | | | | Fix an absolutely terrible comment.Gravatar Leon Sandøy2020-07-19-1/+1
| | | | | | | | |
| | * | | | | | | Remove AntiMalWare constants, use cache data.Gravatar Leon Sandøy2020-07-18-55/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also updates the tests for this cog.
| | * | | | | | | Remove Filtering constants, use cache data.Gravatar Leon Sandøy2020-07-18-135/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of fetching the guild invite IDs from config-default.yml, we will now be using the AllowDenyList cache to check these.
| | * | | | | | | Add more logging to AllowDenyLists cog.Gravatar Leon Sandøy2020-07-18-2/+11
| | | | | | | | |
| | * | | | | | | Add AllowDenyLists cog.Gravatar Leon Sandøy2020-07-18-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes commands to add, remove and show the items in the whitelists and blacklists for the different list types. Commands are limited to Moderators+.
| | * | | | | | | Make the cache more convenient to access.Gravatar Leon Sandøy2020-07-18-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of just dumping the JSON response from the site, we'll build a data structure that it will be convenient to access from our new cog, and from the Filtering cog.
| | * | | | | | | Bulletlist with valid file types in converter.Gravatar Leon Sandøy2020-07-18-2/+2
| | | | | | | | |
| | * | | | | | | Better BadArgument exception text.Gravatar Leon Sandøy2020-07-18-2/+3
| | | | | | | | |
| | * | | | | | | Kaizen: Make error_handler.py more embeddy.Gravatar Leon Sandøy2020-07-17-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, some types of errors are returning plain strings that repeat the input (which can be exploited to deliver stuff like mentions), and others are returning generic messages that don't give any exception information. This commit unifies our approach around putting as much information as we can (including the exception message), but always putting it inside an embed, so that stuff like pings will not fire. This, combined with the 1.4.0a `allowed_mentions` functionality, seems like a reasonable compromise between security and usability.
| | * | | | | | | Add ValidAllowDenyListType converter.Gravatar Leon Sandøy2020-07-17-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll use this to ensure the input is valid when people try to whitelist or blacklist stuff. It will fetch its data from an Enum maintained on the site, so that the types of lists we support will only need to be maintained in a single place, instead of duplicating that data in the bot and the site.
| | * | | | | | | Cache AllowDenyList data at bot startup.Gravatar Leon Sandøy2020-07-17-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't be making an API call for every single message posted, so what we're gonna do is cache the data in the Bot, and then update the cache whenever we make changes to it via our new AllowDenyList cog. Since this cog will be the only way to make changes to this, this level of lazy caching should be enough to always keep the cache up to date.
| | * | | | | | | Kaizen: Move OffTopicName to converters.py.Gravatar Leon Sandøy2020-07-17-29/+28
| | | | | | | | |
* | | | | | | | | Zero-fill discriminators in infraction searchesGravatar MarkKoz2020-08-10-1/+1
| | | | | | | | |
* | | | | | | | | Use format_user in token remover testGravatar MarkKoz2020-08-10-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point of format_user is to have a consistent format across the code base. That should apply to tests too.
* | | | | | | | | Concatenate string in one lineGravatar MarkKoz2020-08-10-2/+1
| | | | | | | | |
* | | | | | | | | Fix conflict with disabling filter ping for DMsGravatar MarkKoz2020-08-02-68/+307
|\| | | | | | | |
| * | | | | | | | Remove superfluous Available help channels.Gravatar Leon Sandøy2020-07-31-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a little bit of logic to the Help Channel `init_available` coroutine, which runs when the cog loads. This ensures that if there are more help channels in available than there should be, we remove the superfluos ones. Previously, if the bot started with too many channels, it would maintain and defend that excessive amount. This is because we never actually count the number of channels before adding in new available channels whenever one disappears. If we ever get too many available channels in the future, this can be solved by simply reloading this cog.
| * | | | | | | | Merge pull request #1073 from python-discord/fix/webhook_removerGravatar Leon Sandøy2020-07-30-1/+1
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Change regex so it catches new discord URL
| | * | | | | | | | Use full flag name for case-insensitivityGravatar Senjan212020-07-30-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requested by lemon
| | * | | | | | | | Missed `?` in regex.Gravatar Senjan212020-07-30-1/+1
| | | | | | | | | |
| | * | | | | | | | Use non-capturing group instead.Gravatar Senjan212020-07-30-1/+1
| | | | | | | | | |
| | * | | | | | | | Change regex so it catches new discord URLGravatar Senjan212020-07-30-1/+1
| |/ / / / / / / /
| * | | | | | | | Merge pull request #1072 from python-discord/fix/message_pinGravatar Sebastiaan Zeeff2020-07-30-0/+2
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix channel moving incase `message.pin` fails
| | * | | | | | | | Fix channel moving incase `message.pin` failsGravatar Senjan212020-07-30-0/+2
| |/ / / / / / / /
| * | | | | | | | Merge pull request #1071 from python-discord/no_mod_alert_ping_for_dmsGravatar Dennis Pham2020-07-29-1/+1
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Don't ping everyone in #mod-alerts when tripping filter via DMs.
| | * | | | | | | | Don't ping everyone when tripping filter in DMs.Gravatar Leon Sandøy2020-07-29-1/+1
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need a ping in #mod-alerts whenever someone is tripping a filter (like invites or bad language) in a DM to the bot. We can still send an embed, so that we can action it, but there is no urgent need to respond if it's just a direct message to the bot. This is particularly true now that we have #dm-log.
| * | | | | | | | Merge pull request #1023 from ks129/help-channels-pinGravatar Mark2020-07-28-0/+24
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Help System: Implement question message pinning
| | * \ \ \ \ \ \ \ Merge branch 'master' into help-channels-pinGravatar Mark2020-07-28-481/+2396
| | |\ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | |
| * | | | | | | | | Merge pull request #1069 from python-discord/fix/pollGravatar scragly2020-07-29-2/+2
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | correct import orderGravatar Senjan212020-07-28-1/+1
| | | | | | | | | | |
| | * | | | | | | | | fix poll command by using clean_content converterGravatar Senjan212020-07-28-2/+2
| |/ / / / / / / / /