aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | | | fix linting issuesGravatar Ryu182021-08-07-2/+2
| | | | | | |
| * | | | | | added escape markdown in PythonNewsGravatar Ryu182021-08-07-2/+9
| | | | | | |
| | * | | | | Modify reminder response messages to be in the correct formatGravatar D0rs4n2021-08-22-2/+2
| | | | | | |
| | * | | | | Provide jump_url in reminders even when the bot repliesGravatar D0rs4n2021-08-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the message is in the same channel and the bot replies, from now on it will also provide a jump_url for the sake of consistency
| | * | | | | Improve code consitency in remaindersGravatar D0rs4n2021-08-13-2/+2
| | | | | | |
| | * | | | | Update reminders to reply instead of using a jump url to the origin messageGravatar D0rs4n2021-08-13-15/+22
| | | | | | |
| | | | | * | Clarify a commentGravatar MarkKoz2021-07-23-1/+1
| | | | | | |
| | | | | * | Fix pardon_infraction call for permanent bansGravatar MarkKoz2021-07-23-1/+1
| | | | | | |
| | | | | * | Add missing notify param to _pardon_action for superstarifyGravatar MarkKoz2021-07-23-12/+13
| | | | | | |
| | | | | * | Avoid sending pardon DM when overriding a muteGravatar MarkKoz2021-07-15-30/+59
| | | | | | |
| | | | | * | Remove redundant parameter from pardon_voice_banGravatar MarkKoz2021-07-15-5/+5
| | | | | | |
| | | | | * | Fix get_active_infraction testGravatar MarkKoz2021-07-15-2/+2
| | | | | | |
| | | | | * | Display error if overriding mute failsGravatar MarkKoz2021-07-15-1/+7
| | | | | | |
| | | | | * | Allow manual mutes to override auto mutesGravatar MarkKoz2021-07-15-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a moderator mutes a user, allow them to override any active mute that was automatically applied by the bot (e.g. from antispam). Resolve #1665
| | | | | | * Improve cache iteration speedGravatar Boris Muratov2021-08-22-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | getitem based iteration included operations that aren't necessary when iterating over the cache continuously. Adding an iter method to the class seems to have improved iteration speed by several orders of magnitude.
| | | | | | * Additional comments and tests for slicingGravatar mbaruh2021-08-21-2/+5
| | | | | | |
| | | | | | * Clean up codeGravatar mbaruh2021-08-21-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed unused import, corrected docstring, and removed unnedded type annotation.
| | | | | | * Fix MessageCache slicing bugs, improve testsGravatar mbaruh2021-08-21-26/+41
| | | | | | |
| | | | | | * Identify DeletionContext by members, not channelsGravatar mbaruh2021-08-21-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the anti-spam now works cross-channels, it makes no sense to identify it by the channel in which it was invoked. The DeletionContext class was changed to accept a frozenset of members, and the message_deletion_queue dict uses the frozensets as keys. DeletionContext still accepts a channel on creation, because while it might get added more channels, there's only one channel in which the mute message will be sent. Using members as the key can run into the issue of one member becoming irrelevant to the filter while others still are, resulting in another log message being sent, but it's an unlikely edge case since the users should be muted almost immediately, and we're currently not using any multi-member filters in the first place.
| | | | | | * AntiSpam deletes from all spammed channelsGravatar mbaruh2021-08-21-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The anti-spam cog was amended to handle cross-channel spam.
| | | | | | * AntiSpam modified to work with cacheGravatar mbaruh2021-08-21-9/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The anti-spam cog now uses a cache instead of reading channel history. The cache is for all channels in the guild, and does not remove deleted messages. That means that the anti-spam logic now works cross-channel and counts deleted messages. The size of the cache is determined via a new field in the config YAML file. The cache was implemented as a separate class, MessageCache, which uses circular buffer logic. This allows for constant time addition and removal form either side, and lookup. The cache does not support removal from the middle of the cache. The cache additionally stores a mapping from message ID's to the index of the message in the cache, to allow constant time lookup by message ID. The commit additionally adds accompanying tests, and renames `cache.py` to `caching.py` to better distinguish it from the new `message_cache.py` and convey that it's for general caching utilities.
| | | | | | * Move max_interval to initGravatar Boris Muratov2021-08-17-8/+8
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | The on_message event calculated the max interval value every time for no reason. The value is constant throughout the bot's up time.
* | | | | | Merge #1752 - help channels: fix initialisation of available channels setGravatar Mark2021-08-16-14/+8
|\ \ \ \ \ \
| * \ \ \ \ \ Merge branch 'main' into bug/help/1715/avail-set-initGravatar Mark2021-08-16-54/+74
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #1753 from D0rs4n/pr/deletewebhookGravatar ChrisJL2021-08-16-7/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Delete Webhooks when one is accidentally posted.
| * \ \ \ \ \ \ Merge branch 'main' into pr/deletewebhookGravatar ChrisJL2021-08-16-47/+58
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #1716 from ↵Gravatar ChrisJL2021-08-16-46/+57
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/bug/info/bot-13b/code-snippet-msg-404 Don't send code snippets if the original message was deleted
| * \ \ \ \ \ \ \ Merge branch 'main' into bug/info/bot-13b/code-snippet-msg-404Gravatar ChrisJL2021-08-16-282/+584
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #1754 from python-discord/wookie184-patch-1Gravatar Boris Muratov2021-08-16-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove the admins mention from the modmail tag
| * | | | | | | | | Remove the admins mention from the modmail tagGravatar wookie1842021-08-16-1/+1
|/ / / / / / / / /
| * | | | | | | | CodeSnippets: don't send snippets if the original message was deletedGravatar MarkKoz2021-08-03-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes BOT-13B
| * | | | | | | | CodeSnippets: refactor snippet parsing into a separate functionGravatar MarkKoz2021-08-03-8/+12
| | | | | | | | |
| * | | | | | | | CodeSnippets: move __init__ to the top of the class definitionGravatar MarkKoz2021-08-03-11/+11
| | | | | | | | |
| * | | | | | | | CodeSnippets: refactor on_messageGravatar MarkKoz2021-08-03-35/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce nesting and code duplication.
| | * | | | | | | Improve output message consistency in webhook_removerGravatar D0rs4n2021-08-16-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Bluenix <[email protected]>
| | * | | | | | | Patch the regEx pattern in webhook_remover to match edge casesGravatar D0rs4n2021-08-16-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regEx pattern did not match the 'https://' part in case of canary urls Thus, from now on the regEx pattern matches the full canary urls as well.
| | * | | | | | | Fix up, and improve code consistency in webhook_removerGravatar D0rs4n2021-08-16-2/+2
| | | | | | | | |
| | * | | | | | | Improve code consistency in webhook_removerGravatar D0rs4n2021-08-16-9/+7
| | | | | | | | |
| | * | | | | | | Enhance security in the Webhook remover.Gravatar D0rs4n2021-08-16-6/+14
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, webhooks that were posted in the chat will be also deleted from Discord in order to eliminate the risk.
| | * | | | | | HelpChannels: use utility method to get available channelsGravatar MarkKoz2021-08-16-3/+1
| | | | | | | |
| | * | | | | | HelpChannels: simplify formatting of category names in dormant msgGravatar MarkKoz2021-08-15-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant retrieval of category objects. Include the asking guide URL in the message via an f-string.
| | * | | | | | HelpChannels: fix incomplete init of available channel setGravatar MarkKoz2021-08-15-5/+4
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the cog is reloaded while there are less than the maximum amount of available channels, it makes some channels available until the limit is reached. When a channel is made available, it updates the `available_help_channels` set. The `update_available_help_channels()` function would not update this set if it saw that the set already contains elements. This resulted in only the channels that were just made available being in the set; the set would not contain the channels that were already available when the bot started. Fix this by unconditionally populating the set, but moving it to `init_available()` so it only happens once. Fix BOT-Z1 Fix #1715
* | | | | | | Merge pull request #1677 from python-discord/mbaruh/jam-managementGravatar Boris Muratov2021-08-16-214/+390
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Additional code jam management utilities
| * \ \ \ \ \ \ Merge branch 'main' into mbaruh/jam-managementGravatar Boris Muratov2021-08-16-571/+1612
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #1745 from python-discord/fix-nomination-archive-checkGravatar Matteo Bertucci2021-08-15-8/+10
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | fix: Nomination message now checks historic and new style nominations
| * | | | | | | fix: Nomination message now checks historic and new style nominationsGravatar Chris Lovering2021-08-12-8/+10
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously nomination messages had role pings in them, now they don't as we moved them into a thread. Due to this, we need to detect both in the interim of historic nominations existing. A 'proper' fix for this is to store the nomination message IDs when we post them against the nomination object in the site api. We are planing to work on this soon, this commit is a short term fix.
* | | | | | | Remove role pings when a helper vote is posted (#1744)Gravatar ChrisJL2021-08-11-2/+2
| | | | | | |
* | | | | | | Merge #1726 - catch various 404s from message operationsGravatar Mark2021-08-11-12/+37
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | Merge branch 'main' into bug/message-404Gravatar Mark2021-08-11-13/+16
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #1740 from python-discord/TizzySaurus-patch-1Gravatar Matteo Bertucci2021-08-11-1/+1
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Remove added punctuation from reminder