aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added `user.send` call assertion to ↵Gravatar ks1232020-03-05-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_send_private_embed`.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added API POST call assertion to `test_post_user`.Gravatar ks1232020-03-05-5/+24
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added new assertions to `notify_pardon`, added ↵Gravatar ks1232020-03-05-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ctx.send` raising errors, added check for return values and `send_private_embed` call.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added new assertions to `post_infraction`, added ↵Gravatar ks1232020-03-05-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ctx.send` raising errors, added check for return values and `send_private_embed` call.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added following new assertions to ↵Gravatar ks1232020-03-05-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `has_active_infraction` tests: `ctx.send` and `bot.api_client.get` calling.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Use `bot.cogs.moderation.utils`'s `RULES_URL` ↵Gravatar ks1232020-03-05-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead creating new one
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Removed unnecessary `AsyncMock()` from `__init__` ↵Gravatar ks1232020-03-05-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (`self.bot.api_client.get`)
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Moved `has_active_infraction` tests to one test.Gravatar ks1232020-03-05-22/+35
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): `send_private_embed` moved exception creating from ↵Gravatar ks1232020-03-05-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cases testing to test cases listing, added side_effect resetting.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `post_infraction` function, ↵Gravatar ks1232020-03-05-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created __init__.py for moderation tests
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `send_private_embed` function + ↵Gravatar ks1232020-03-04-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed errors.
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `post_user` function.Gravatar ks1232020-03-04-1/+59
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `notify_pardon` function.Gravatar ks1232020-03-04-2/+39
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `notify_infraction` function.Gravatar ks1232020-03-04-2/+91
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Created tests for `has_active_infraction` functionGravatar ks1232020-03-03-0/+24
| | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | (Moderation Utils Tests): Added imports, modified tests class instance and ↵Gravatar ks1232020-03-03-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created new params for tests class
| | | | | | | | * | | | | | | | | Created file for moderation utils tests + added setUp to this.Gravatar ks1232020-03-03-0/+12
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | Fix cog_check testsGravatar MarkKoz2020-09-08-8/+12
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | Fix tests for has_any_role_checkGravatar MarkKoz2020-09-08-16/+18
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | Rename role checks and decoratorsGravatar MarkKoz2020-09-08-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make their names more in line with `has_any_role` for consistency.
| | | | | | | | | | | * | | | | | Implement role checks using has_any_roleGravatar MarkKoz2020-09-07-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `has_any_role` to reduce redundancy. Because discord.py always makes a check's predicate a coroutine, the checks now have to be awaited.
| | | | | | | | | | | * | | | | | Use has_any_role's predicate directlyGravatar MarkKoz2020-09-06-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places, it's more appropriate than using with_role_check since it will raise CheckFailures. This applies to `cog_check`s and other things which effectively act as command checks.
| | | | | | | | | | | * | | | | | Implement the without_role decorator by negating has_any_roleGravatar MarkKoz2020-09-06-6/+17
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | Remove with_role decorator in favour of has_any_roleGravatar MarkKoz2020-09-05-76/+58
| |_|_|_|_|_|_|_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `with_role` is obsolete because discord.py provides `has_any_role`.
| | | | | | | | | | | | * | | | Create a UserMention converterGravatar MarkKoz2020-08-11-4/+20
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | Replace InfractionSearchQuery with a generic Snowflake converterGravatar MarkKoz2020-08-11-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's unnecessarily precise to do an fetch user API call in order to distinguish between a user and a reason. Furthermore, a User object isn't actually required for infraction searches - only an ID is.
| | | | | | | | | | | | * | | | Resolve conflicts in filtering.pyGravatar MarkKoz2020-08-10-562/+894
| | | | | | | | | | | | |\ \ \ \
| | | | | | | | | | | | * | | | | 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
| | | | | | | | | | | | |\ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Fix test for token remover log messageGravatar MarkKoz2020-07-21-2/+1
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Use user mentions in infraction search resultsGravatar MarkKoz2020-07-21-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using our expanded API is more efficient than making a request to the Discord API for potentially every user in the search results. The data may not be up to date, but that's an acceptable compromise.
| | | | | | | | | | | | * | | | | ModLog: use user mentionsGravatar MarkKoz2020-07-21-22/+12
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Filtering: use user mentions in mod logsGravatar MarkKoz2020-07-21-6/+5
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Filtering: refactor _add_stats to return a NamedTupleGravatar MarkKoz2020-07-21-25/+27
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Filtering: refactor sending of mod logGravatar MarkKoz2020-07-21-59/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of redundant code existed between the message and eval filters.
| | | | | | | | | | | | * | | | | Use user mentions in mod logsGravatar MarkKoz2020-07-21-10/+14
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Moderation: use user mentions in mod logsGravatar MarkKoz2020-07-21-18/+14
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Moderation: remove multiple active infractions checkGravatar MarkKoz2020-07-21-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API was change a long time ago to not allow such a situation.
| | | | | | | | | | | | * | | | | Superstarify: escape Markdown in nicknamesGravatar MarkKoz2020-07-21-1/+4
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | * | | | | Superstarify: use user mentions in mod logsGravatar MarkKoz2020-07-21-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `format_user` isn't used in the apply mod log cause it already shows both the old and new nicknames elsewhere.
| | | | | | | | | | | | * | | | | Add util function to format user namesGravatar MarkKoz2020-07-21-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used a lot when sending mod logs and will help with reducing redundancy and maintaining consistency.
| | | | | | | | | | | | * | | | | Clean up importsGravatar MarkKoz2020-07-21-14/+13
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | * | | Constants: remove staff_channelsGravatar MarkKoz2020-09-02-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer being used anywhere.
| | | | | | | | | | | | | | * | | Fix user command testsGravatar MarkKoz2020-08-26-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mocking the bot commands channel constant no longer worked after switching to `in_whitelist_check`.
| | | | | | | | | | | | | | * | | Fix infraction counts being shown in wrong channelsGravatar MarkKoz2020-08-26-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They should only be shown in mod channels, not all staff channels. Fix #1127
| | | | | | | | | | | | | | * | | Info: show verbose infractions if user cmd invoked in modmailGravatar MarkKoz2020-08-25-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #1125
| | | | | | | | | | | | | | * | | Info: simplify channel redirection for the user commandGravatar MarkKoz2020-08-25-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `in_whitelist_check` is a convenient utility that does the same thing as the previous code.
| | | | | | | | | | | | | | | | * Lock: make LockGuard.locked a propertyGravatar MarkKoz2020-10-03-1/+2
| | | | | | | | | | | | | | | | |