aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | | | * | | | | | | (Moderation Utils Tests): Moved embed generating to test cases loop from ↵Gravatar ks1232020-03-12-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test cases listing, added icon to test cases in `notify_pardon` test
| | | | | | | | * | | | | | | (Moderation Utils Tests): Added params to variable in ↵Gravatar ks1232020-03-12-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `has_active_infraction` test.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Create extra new tests set for `post_infraction` ↵Gravatar ks1232020-03-12-103/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testing, removed old.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Moved mock resetting to beginning of subtest in ↵Gravatar ks1232020-03-08-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `post_user` and `send_private_embed` test.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed unnecessary `if` check from ↵Gravatar ks1232020-03-08-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `send_private_embed` test
| | | | | | | | * | | | | | | (Moderation Utils Tests): Hard-coded args for `send_private_embed` test.Gravatar ks1232020-03-08-10/+6
| | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | (Moderation Utils Tests): Added new check to `post_user` test (`ctx.send` ↵Gravatar ks1232020-03-08-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | content test), improved test cases.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Moved `expected_output` from `Dict` to ↵Gravatar ks1232020-03-08-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `discord.Embed` in `notify_pardon` test.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed unnecessary `ctx.send` `side_effect` from ↵Gravatar ks1232020-03-08-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `notify_pardon`, applied changes to test cases.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Moved `notify_infraction` embed check from dict to ↵Gravatar ks1232020-03-08-28/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Embed`.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed unnecessary `ctx.send` mock resetting, ↵Gravatar ks1232020-03-08-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moved `send_private_embed` mock reset to beginning of subtest.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed unnecessary `ctx.send` `side_effect` and ↵Gravatar ks1232020-03-08-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removed these in test cases too in `notify_infraction` test.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed `Dict` unpacking in `notify_infraction` test.Gravatar ks1232020-03-08-20/+20
| | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | (Moderation Utils Tests): Cleaned up `has_active_infraction` test cases, ↵Gravatar ks1232020-03-08-30/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hard-coded args, moved mocks resetting to beginning of subtest, added `ctx.send` check only is infraction nr and type in sent string.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Hard-coded API get request params for ↵Gravatar ks1232020-03-08-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `has_active_infraction` test.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Removed large `utils` parts import, use import ↵Gravatar ks1232020-03-08-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `utils` instead and added `utils` before variables and function that was imported directly before.
| | | | | | | | * | | | | | | (Moderation Utils Tests): Fixed docstrings, added more information to these.Gravatar ks1232020-03-08-6/+8
| | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | (Moderation Utils Tests): Fixed errors, added checks before assertions for ↵Gravatar ks1232020-03-05-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errors
| | | | | | | | * | | | | | | (Moderation Utils Tests): Added additional assertions to `post_infraction` test.Gravatar ks1232020-03-05-8/+54
| | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | (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`.
* | | | | | | | | | | | | | Merge pull request #1144 from Numerlor/text-link-fixGravatar Shirayuki Nekomata2020-09-05-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move bolding markdown outside of text link in help channel messages.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into text-link-fixGravatar Shirayuki Nekomata2020-09-05-8/+17
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | |
* | | | | | | | | | | | | | | Disable everyone_ping filter in AntiSpam cogGravatar Sebastiaan Zeeff2020-09-05-4/+8
| |_|_|_|_|_|_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As there are a few bugs in the implementation, I've temporarily disabled the at-everyone ping filter in the AntiSpam cog. We can disable it after we've fixed the bugs. Signed-off-by: Sebastiaan Zeeff <[email protected]>
* | | | | | | | | | | | | | Disable burst_shared filter of the AntiSpam cogGravatar Sebastiaan Zeeff2020-09-04-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our AntiSpam cog suffers from a race condition that causes it to try and infract the same user multiple times. As that happens frequently with the burst_shared filter, it means that our bot joins in and starts spamming the channel with error messages. Another issue is that burst_shared may cause our bot to send a lot of DMs to a lot of different members. This caused our bot to get a DM ban from Discord after a recent `everyone` ping incident. I've decided to disable the `burst_shared` filter by commenting out the relevant lines but leave the code in place otherwise. This means we still have the implementation handy in case we want to re-enable it on short notice. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | | | | | Move bolding markdown outside of text link.Gravatar Numerlor2020-09-04-2/+2
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some devices the markdown gets rendered improperly, leaving the asterisks in the message without bolding.
* | | | | | | | | | | | | Merge pull request #1132 from ↵Gravatar Mark2020-09-03-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/bug/filters/1130/ignore-codeblock-emoji AntiSpam: ignore custom emojis in code blocks
| * | | | | | | | | | | | | AntiSpam: ignore custom emojis in code blocksGravatar MarkKoz2020-08-27-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In code blocks, custom emojis render as text rather than as images. Therefore, they probably aren't being spammed and should be ignored. Fix #1130