aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* 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
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | Merge pull request #972 from Numerlor/tag-encodingGravatar Mark2020-05-29-1/+1
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Specify encoding when reading tag files
| * | | | | Tags: explicitly use UTF-8 to read filesGravatar MarkKoz2020-05-30-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all operating systems use UTF-8 as the default encoding. For systems that don't, reading tag files with Unicode would cause an unhandled exception. (cherry picked from commit adc75ff9bbcf8b905bd78c78f253522ae5e42fc3)
* | | | | Merge pull request #965 from Akarys42/patch-1Gravatar Dennis Pham2020-05-29-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | Ignore response when posting python news
| * | | | Merge branch 'master' into patch-1Gravatar Dennis Pham2020-05-29-31/+8
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Merge pull request #966 from python-discord/sebastiaan/help-channels/ratelimitsGravatar Joseph Banks2020-05-29-31/+8
|\ \ \ \ \
| * | | | | Reduce the number of help channel name changesGravatar Sebastiaan Zeeff2020-05-29-29/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discord has introduced a new, strict rate limit for individual channel edits that reduces the number of allow channel name/channel topic changes to 2 per 10 minutes per channel. Unfortunately, our help channel system frequently goes over that rate limit as it edits the name and topic of a channel on all three "move" actions we have: to available, to occupied, and to dormant. In addition, our "unanswered" feature adds another channel name change on top of the move-related edits. That's why I've removed the topic/emoji changing features from the help channel system. This means we now have a generic topic that fits all three categories and no status emojis in the channel names.
| * | | | | Fix `check_for_answer` breaking on missing cacheGravatar Sebastiaan Zeeff2020-05-29-2/+5
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `check_for_answer` method of the HelpChannels cog relies on the channel->claimant cache being available. However, as this cache is (currently) lost during bot restarts, this method may fail with a KeyError exception. I've used `dict.get` with an `if not claimant: return` to circumvent this issue.
| * / / / Ignore response when posting python newsGravatar Matteo Bertucci2020-05-29-0/+1
|/ / / / | | | | | | | | Sometimes a mailing list user doesn't press respond correctly to the email, and so a response is sent as a separate thread. To keep only new threads in the channel, we need to ignore those.
* | | | 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
| |\ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | 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
| | | | | |