aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' into bug/backend/stats-category-checkGravatar Dennis Pham2020-06-07-33/+96
|\
| * Enable the 'redis' / 'aiohttp' Sentry integrationsGravatar Leon Sandøy2020-06-06-1/+7
| | | | | | | | | | | | | | This will provide breadcrumbs for these systems in all our Sentry events, if applicable. Closes #989.
| * Merge pull request #985 from ks129/rules-statsGravatar kwzrd2020-06-06-0/+3
| |\ | | | | | | Stats: Implement rules stats
| | * Merge branch 'master' into rules-statsGravatar kwzrd2020-06-06-185/+460
| | |\ | | |/ | |/|
| * | Merge pull request #970 from python-discord/staff_count_serverGravatar kwzrd2020-06-05-12/+65
| |\ \ | | | | | | | | Add staff counts to !server
| | * \ Merge branch 'master' into staff_count_serverGravatar kwzrd2020-06-05-72/+66
| | |\ \ | | |/ / | |/| |
| * | | Merge pull request #984 from ↵Gravatar Joseph Banks2020-06-05-20/+21
| |\ \ \ | | | | | | | | | | | | | | | | | | | | python-discord/sebastiaan/issues/982-infraction-dm-order Send infraction DM before applying infraction
| | * | | Send infraction DM before applying infractionGravatar Sebastiaan Zeeff2020-06-05-20/+21
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've "reverted" the change that reversed the order of DM'ing a user about their infraction and applying the actual infraction. A recent PR reversed the order to stop us from sending DMs when applying the infraction failed. However, in order to DM a user, the bot has to share a guild with the recipient and kicking them off of our server first does not help with that. That's why I reverted the change and reverted some other minor changes made in relation to this change. Note: I did not change the code sending the DM itself; I merely moved it back to where it belongs and added a comment about the necessity of doing the DM'ing first. I couldn't cleanly revert a commit to do this, as changes were spread out over and included in multiple commits that also contained changes not related to the `DM->apply infraction` order.
| | * | Fix a bad check in get_staff_channel_count.Gravatar Leon Sandøy2020-05-31-7/+5
| | | | | | | | | | | | | | | | | | | | This also changes a few aesthetic problems pointed out in review by @MarkKoz and @kwzrd.
| | * | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-31-106/+356
| | |\ \
| | * | | Move counting of channels to a separate methodGravatar MarkKoz2020-05-30-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | This de-clutters the main `server_info` function and improves its readability.
| | * | | Simplify counting of staff channels and improve efficiencyGravatar MarkKoz2020-05-30-49/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplification comes from being able to access permissions as attributes on the overwrite object. This removes the need to iterate all permissions. Efficiency comes from checking all roles within a single iteration of all channels. This also removes the need to flatten and filter the channels afterwards, which required additional iterations.
| | * | | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-30-1/+1
| | |\ \ \
| | * | | | Don't membership check in an itertools.chain.Gravatar Leon Sandøy2020-05-30-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're using the set comprehension to prevent duplicates anyway, so flipping these back makes more sense. Also added a missing ctx and tested ok.
| | * | | | Prevent duplicates, and break into function.Gravatar Leon Sandøy2020-05-30-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We're using a set comprehension and flipping the order for counting the number of channels that are both staff allow and @everyone deny. - We're breaking the staff channel count stuff into a separate helper function so it doesn't crowd the server_info() scope. These fixes are both to address the code review from @MarkKoz, thanks Mark.
| | * | | | Fix busted test_information test.Gravatar Leon Sandøy2020-05-30-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | I wish this test didn't exist.
| | * | | | More precise staff-channel check.Gravatar Leon Sandøy2020-05-30-13/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now check: - Does the @everyone role have explicit read deny permissions? - Do staff roles have explicit read allow permissions? If the answer to both of these are yes, it's a staff channel. By 'staff roles', I mean Helpers, Moderators or Admins.
| | * | | | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-30-0/+1
| | |\ \ \ \
| | * | | | | Adding staff member count to !server.Gravatar Leon Sandøy2020-05-30-4/+10
| | | | | | |
| | * | | | | Clean up channel counts and add staff channels.Gravatar Leon Sandøy2020-05-29-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up a particularly dirty line by turning it into like 10 lines, and also adding the number of channels that are hidden to the `@everyone` role - which we're classifying as "Staff channels".
| | | | | | * Stats: Implement rules statsGravatar ks1292020-06-05-0/+3
| | | | | | | | | | | | | | | | | | | | | Increase every shown rule uses count when command called.
* | | | | | | Fix AttributeError for category checkGravatar MarkKoz2020-06-04-1/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Not all channels will have a category attribute. This may be fine in production, but it does cause periodic errors when testing locally.
* | | | | | Merge pull request #979 from neonsea/modmail-tagGravatar Dennis Pham2020-06-02-0/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add the !modmail tag
| * | | | | | add modmail tagGravatar Rasmus Moorats2020-06-02-0/+9
|/ / / / / /
* | | | | | Merge pull request #962 from python-discord/stop_sending_avatar_hashGravatar Sebastiaan Zeeff2020-06-02-11/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove all sending of avatar_hash
| * \ \ \ \ \ Merge branch 'master' into stop_sending_avatar_hashGravatar Sebastiaan Zeeff2020-06-02-41/+34
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #974 from python-discord/multichannel_purgeGravatar Dennis Pham2020-05-31-41/+34
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Add multichannel !purge
| * | | | | | Use the messages returned by `purge` to upload message logsGravatar MarkKoz2020-05-31-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that only what was actually deleted will be uploaded. I managed to get a 400 response from our API when purging twice in quick succession. Searching the history manually for these messages is unreliable cause of some sort of race condition.
| * | | | | | Revert message ignore approach.Gravatar Leon Sandøy2020-05-31-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're removing the context manager due to async concerns, so we'll go back to the old approach again of ignoring specific messages and iterating history.
| * | | | | | Revert "Add a mod_log.ignore_all context manager."Gravatar Leon Sandøy2020-05-31-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0737b1a6 This isn't gonna work, because async is a thing.
| * | | | | | Merge branch 'master' into multichannel_purgeGravatar Leon Sandøy2020-05-31-44/+3
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Fix a bug with invocation deletion.Gravatar Leon Sandøy2020-05-31-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command was written to support only a single channel, and with the move to multi-channel purges, we need to rethink the way the invocation deletion happens. We may be invoking this command from a completely different channel, so we can't necessarily look inside the channels we're targeting for the invocation. So, we're solving this by just deleting the invocation by using ctx.message. We do this before we start iterating message history, and then we only need to iterate the number of messages that was passed into the command. A much cleaner approach, which solves the bug reported and identified by @MarkKoz.
| * | | | | | Add a mod_log.ignore_all context manager.Gravatar Leon Sandøy2020-05-31-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new context manager makes it easier to make the mod_log ignore actions like message deletions. The only existing method is the `ignore()` method, which requires that you pass all the messages you want to ignore into it. This one just ignores everything inside its scope. This isn't the DRYest approach, but it's low-cost and improves the readability of clean.py quite a bit. Ideally we should go through and give modlog a proper cleanup, because it's kinda ugly right now.
| * | | | | | Remove unnecessary conditional.Gravatar Leon Sandøy2020-05-31-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks @MarkKoz!
| * | | | | | Better channel mentionsGravatar Leon Sandøy2020-05-31-1/+1
| | | | | | | | | | | | | | | | | | | | | Co-authored-by: Mark <[email protected]>
| * | | | | | Remove a completely unacceptable newline.Gravatar Leon Sandøy2020-05-30-1/+0
| | | | | | |
| * | | | | | Add multichannel !purge via commands.GreedyGravatar Leon Sandøy2020-05-30-31/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can now pass in as many channel mentions as we want after any !purge command - for example `!purge all 5 #python-general #python-language`
| | * | | | | Merge branch 'master' into stop_sending_avatar_hashGravatar Leon Sandøy2020-05-31-408/+1588
| | |\ \ \ \ \ | |_|/ / / / / |/| | | | | |
* | | | | | | Merge pull request #973 from python-discord/kwzrd/improve-freeGravatar kwzrd2020-05-31-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Link #how-to-get-help in !free tag
| * \ \ \ \ \ \ Merge branch 'master' into kwzrd/improve-freeGravatar kwzrd2020-05-31-42/+1
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #971 from python-discord/remove_periodic_pingGravatar kwzrd2020-05-30-42/+1
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Remove the periodic ping from #verification
| * | | | | | | Merge branch 'master' into remove_periodic_pingGravatar kwzrd2020-05-30-63/+354
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | Oops, add the return back.Gravatar Leon Sandøy2020-05-30-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not wanna process bot messages.
| * | | | | | | Merge branch 'master' into remove_periodic_pingGravatar Leon Sandøy2020-05-30-0/+1
| |\ \ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | |
| * | | | | | | Removing the periodic ping from verification.Gravatar Leon Sandøy2020-05-30-43/+1
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | It's no longer needed, and causes problems with anti-raid and anti-spam.
| | | * | | | Free tag: link #how-to-get-helpGravatar kwzrd2020-05-30-2/+2
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | This creates a clickable link in the response embed. Referencing the category is no longer necessary.
* | | | | | Merge pull request #864 from ks129/ban-kick-reason-lengthGravatar Mark2020-05-30-42/+159
|\ \ \ \ \ \ | | | | | | | | | | | | | | Ban and kick reason length fix
| * \ \ \ \ \ Merge branch 'master' into ban-kick-reason-lengthGravatar Mark2020-05-30-350/+1571
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #930 from MrGrote/test_antimalwareGravatar Sebastiaan Zeeff2020-05-30-20/+194
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Add tests for the antimalware cog
| * | | | | | Merge branch 'master' into test_antimalwareGravatar Sebastiaan Zeeff2020-05-30-965/+2124
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |