aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Filtering: Use walrus for better looking of codeGravatar ks1292020-06-11-4/+2
|
* Filtering: Fix nickname filter alert sending spacesGravatar ks1292020-06-11-0/+2
| | | Co-authored-by: Joseph Banks <[email protected]>
* Filtering: Fix some commentsGravatar ks1292020-06-11-2/+2
| | | Co-authored-by: Joseph Banks <[email protected]>
* Remove redis namespace collision testGravatar MarkKoz2020-05-31-10/+0
|
* Remove redis namespace collision preventionGravatar MarkKoz2020-05-31-10/+1
| | | | | | When cogs reload, it would consider their namespace as a conflict with the original namespace. This feature will be removed as a fix until we come up with a better solution.
* Add logging for the bad nickname filterGravatar MarkKoz2020-05-31-0/+2
|
* Fix missing await in bad nickname filterGravatar MarkKoz2020-05-31-18/+17
|
* Filtering: Small fixesGravatar ks1292020-05-31-5/+5
| | | | - Use UTC from timestamp - Rename name bad words checking function
* Filtering: Fix docstringGravatar ks1292020-05-31-1/+1
| | | Co-authored-by: Mark <[email protected]>
* Merge remote-tracking branch 'origin/bad-words-nick' into bad-words-nickGravatar ks1292020-05-31-4/+1
|\
| * Filtering: Create lock in `__init__`Gravatar ks1292020-05-30-4/+1
| | | | | | Move lock creation from `bad_words_in_name` to `__init__`
* | Filtering: Split name filtering to smaller functionsGravatar ks1292020-05-31-11/+24
| |
* | Filtering: On name filtering, replace Message with Embed as argumentGravatar ks1292020-05-31-7/+7
| |
* | Filtering: Add days between alerts as constantGravatar ks1292020-05-31-1/+3
| |
* | Filtering: Rename `bad_words_in_name` to `check_is_bad_words_in_name`Gravatar ks1292020-05-31-2/+2
| |
* | Filtering: Use POSIX instead ISO format to storage alert cooldownsGravatar ks1292020-05-31-3/+2
|/
* Filtering: Refactor bad names checkingGravatar ks1292020-05-29-31/+36
| | | | | | | - Make `bad_words_in_name` and attach it to current `on_message`. - Implement `asyncio.Lock` to avoid race conditions. - Made that this first check is there matches and when there is, check for alert.
* Filtering: Implement bad words detection in nicknamesGravatar ks1292020-05-29-0/+41
|
* Merge pull request #947 from python-discord/redis_persistenceGravatar Sebastiaan Zeeff2020-05-28-182/+1061
|\ | | | | RedisCache - Data Persistence
| * Move the `self.redis_closed` into session create.Gravatar Leon Sandøy2020-05-28-1/+1
| |
| * Prevent a state where a coro could wait forever.Gravatar Leon Sandøy2020-05-28-2/+6
| | | | | | | | This addresses a review comment by @aeros.
| * Add custom exceptions for each error state.Gravatar Leon Sandøy2020-05-28-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bot can get into trouble in three distinct ways: - It has no Bot instance - It has no namespace - It has no parent instance. These happen only if you're using it wrong. To make the test more precise, and to add a little bit more readability (RuntimeError could be anything!), we'll introduce some custom exceptions for these three states. This addresses a review comment by @aeros.
| * Make prefix consts private and more precise.Gravatar Leon Sandøy2020-05-28-9/+9
| |
| * Reduce complexity on some of the typestring stuff.Gravatar Leon Sandøy2020-05-28-31/+9
| | | | | | | | | | | | | | | | | | - Refactor error messages in _to_typestring and _from_typestring to just print the prefix tuples instead of that custom error string. - Create a RedisKeyOrValue type to simplify some annotations. - Simplify partialmethod calls. - Make the signatures for _to_typestring and _from_typestring one-liners - Fix a typo in the errors.
| * Merge branch 'master' into redis_persistenceGravatar Leon Sandøy2020-05-27-80/+154
| |\ | |/ |/|
* | Merge pull request #961 from ↵Gravatar Sebastiaan Zeeff2020-05-27-88/+161
|\ \ | | | | | | | | | | | | python-discord/moderation_commands_in_modmail_category Permit moderation commands in ModMail category
| * | Add some tests for `in_whitelist_check`.Gravatar Leon Sandøy2020-05-27-0/+48
| | |
| * | Remove the now deprecated in_channel_check.Gravatar Leon Sandøy2020-05-27-16/+0
| | | | | | | | | | | | | | | This check was no longer being used anywhere, having been replaced by in_whitelist_check.
| * | Merge branch 'master' into moderation_commands_in_modmail_categoryGravatar Joseph Banks2020-05-27-0/+1
| |\ \ | |/ / |/| |
* | | Add /r/FlutterDev to the guild invite whitelistGravatar Dennis Pham2020-05-26-0/+1
| | |
| * | Allow some commands to fail checks silently.Gravatar Leon Sandøy2020-05-27-2/+9
| | | | | | | | | | | | | | | | | | For example, we don't want the mod commands to produce any kind of error message when run by ordinary users in regular channels - these should have the perception of being invisible and unavailable.
| * | No redirect for mod management.Gravatar Leon Sandøy2020-05-27-0/+1
| | |
| * | Find + change all InWhitelistCheckFailure importsGravatar Leon Sandøy2020-05-27-9/+8
| | |
| * | Allow infraction management in modmail categoryGravatar Leon Sandøy2020-05-27-12/+13
| | |
| * | Refactor the in_whitelist deco to a check.Gravatar Leon Sandøy2020-05-27-53/+86
|/ / | | | | | | | | | | | | | | | | We're moving the actual predicate into the `utils.checks` folder, just like we're doing with most of the other decorators. This is to allow us the flexibility to use it as a pure check, not only as a decorator. This commit doesn't actually change any functionality, just moves it around.
| * Fix ATROCIOUS comment.Gravatar Leon Sandøy2020-05-27-3/+5
| | | | | | | | I should be shot.
| * Refactor typestring converters to partialmethods.Gravatar Leon Sandøy2020-05-27-30/+24
| | | | | | | | | | | | | | | | | | We're using functools.partialmethod to make the code a little cleaner and more readable here. Read more about them here: https://docs.python.org/3/library/functools.html#functools.partial https://docs.python.org/3/library/functools.html#functools.partialmethod
| * Floats are no longer permitted as RedisCache keys.Gravatar Leon Sandøy2020-05-27-43/+86
| | | | | | | | | | | | | | Also added a test for this. This is the DRYest approach I could find. It's a little ugly, but I think it's probably good enough.
| * Refactor .increment and add lock test.Gravatar Leon Sandøy2020-05-27-65/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we were doing the asyncio.Lock() stuff for increment was slightly problematic. @aeros has adviced us that it's better to just initialize the lock as None in __init__, and then initialize it inside the first coroutine that uses it instead. This ensures that the correct loop gets attached to the lock, so we don't end up getting errors like this one: RuntimeError: got Future <Future pending> attached to a different loop This happens because the lock and the actual calling coroutines aren't on the same loop. When creating a new test, test_increment_lock, we discovered that we needed a small refactor here and also in the test class to make this new test pass. So, now we're creating a DummyCog for every test method, and this will ensure the loop streams never cross. Cause we all know we must never cross the streams.
| * Clear cache in asyncSetUp instead of tests.Gravatar Leon Sandøy2020-05-27-6/+1
| |
| * Merge branch 'master' into redis_persistenceGravatar Leon Sandøy2020-05-26-24/+97
| |\ | |/ |/|
* | Merge pull request #866 from python-discord/restricted_tagsGravatar Shirayuki Nekomata2020-05-26-17/+42
|\ \ | | | | | | feature to restrict tags to specific role(s)
| * \ Merge branch 'master' into restricted_tagsGravatar Shirayuki Nekomata2020-05-26-955/+2577
| |\ \ | |/ / |/| |
* | | [stats] Do not report modmail channels to statsGravatar Joseph Banks2020-05-26-1/+11
| | |
* | | Merge pull request #936 from python-discord/bug/filters/929/invalid-invitesGravatar kwzrd2020-05-25-1/+3
|\ \ \ | | | | | | | | Filtering: don't attempt to send additional embeds for invalid invites
| * \ \ Merge branch 'master' into bug/filters/929/invalid-invitesGravatar kwzrd2020-05-25-594/+833
| |\ \ \ | |/ / / |/| | |
* | | | Add discord.gift to URL blacklist, closes #958Gravatar Joseph Banks2020-05-24-0/+1
| | | |
* | | | Merge pull request #956 from ks129/help-channels-deleteGravatar Sebastiaan Zeeff2020-05-24-5/+40
|\ \ \ \ | | | | | | | | | | Help System: Move dormant faster if help channel is empty
| * \ \ \ Merge branch 'master' into help-channels-deleteGravatar Sebastiaan Zeeff2020-05-24-8/+64
| |\ \ \ \ | |/ / / / |/| | | |
| * | | | HelpChannels: remove `is_dormant_message`Gravatar MarkKoz2020-05-22-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | At this point, it's just a thin wrapper to call another function. It's redundant.