aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | | | | | | * | | | | | | | | Silence tests: fix overwrite preservation test for silencesGravatar MarkKoz2020-08-17-11/+15
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix command message testsGravatar MarkKoz2020-08-17-15/+10
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix test_silence_private_for_falseGravatar MarkKoz2020-08-17-4/+13
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix test_silence_private_silenced_channelGravatar MarkKoz2020-08-17-3/+10
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix test_silence_private_notifierGravatar MarkKoz2020-08-17-0/+3
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix test_unsilence_private_for_falseGravatar MarkKoz2020-08-17-1/+4
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: fix silence cache test for overwritesGravatar MarkKoz2020-08-17-5/+8
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: replace obsolete cog_unload testsGravatar MarkKoz2020-08-17-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moderation notifications are no longer sent so that doesn't need to be tested.
| | | | | | | | | | | * | | | | | | | | Silence tests: rename test_instance_vars to test_init_cogGravatar MarkKoz2020-08-17-5/+5
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Silence tests: mock RedisCachesGravatar MarkKoz2020-08-17-3/+2
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | Tests: optionally prevent autospec helper from passing mocksGravatar MarkKoz2020-08-17-19/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not everything that's decorated needs the mocks that are patched. Being required to add the args to the test function anyway is annoying. It's especially bad if trying to decorate an entire test suite, as every test would need the args. Move the definition to a separate module to keep things cleaner.
| | | | | | | | | | | * | | | | | | | | Silence: rename _get_instance_vars to _init_cogGravatar MarkKoz2020-08-16-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a more accurate name since it also reschedules unsilences now.
| | | | | | | | | | | * | | | | | | | | Silence: remove event and await _get_instance_vars_task directlyGravatar MarkKoz2020-08-16-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The event is redundant because the task can be awaited directly to block until it's complete. If the task is already done, the await will instantly finish.
| | | | | | | | | | | * | | | | | | | | Silence: use aware datetimesGravatar MarkKoz2020-08-16-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `datetime.timestamp()` assumes naïve `datetime`s are in local time, so getting POSIX timestamps in UTC isn't easy for naïve ones. Technically, the timestamp's timezone doesn't matter if all code is on the same page and parsing it with the same timezone. Keeping it in the local timezone would be okay then, but I feel safer locking it to UTC explicitly.
| | | | | | | | | | | * | | | | | | | | Silence: reschedule silences on startupGravatar MarkKoz2020-08-16-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the moderator notification when unloading the cog because. Its purpose was to remind to manually unsilence channels. However, this purpose is now obsolete due to automatic rescheduling. The notification was buggy anyway due to a race condition with the bot shutting down, and that'd be further complicated by having to asynchronously retrieve channels from the redis cache too. Fixes #1053
| | | | | | | | | | | * | | | | | | | | Silence: persist silenced channelsGravatar MarkKoz2020-08-16-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be used to support rescheduling.
| | | | | | | | | | | * | | | | | | | | Silence: add separate unsilence error for manually-silenced channelsGravatar MarkKoz2020-08-15-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was confusing to reject a silence and an unsilence when overwrites were manually set to False. That's because it's contradictory to show an error stating it's already silence but then reject an unsilence with an error stating the channel isn't silenced.
| | | | | | | | | | | * | | | | | | | | Silence: notify admins if previous overwrites were not cachedGravatar MarkKoz2020-08-15-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Admins will have to manually check the default values used and adjust them if they aren't the desired values for that particular channel.
| | | | | | | | | | | * | | | | | | | | Silence: abort silence if there's already a scheduled taskGravatar MarkKoz2020-08-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overwrites can be edited during a silence, which can result in the overwrites check failing. Checking the scheduler too ensures that a duplicate silence won't be scheduled.
| | | | | | | | | | | * | | | | | | | | Silence: revoke permissions to add reactionsGravatar MarkKoz2020-08-15-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer assume default values for the overwrites which are modified. Save and restore previous values `add_reactions` and `send_messages` via redis. When unsilencing, check if a channel is silenced via the redis cache rather than the channel's current overwrites to ensure the task is cancelled even if overwrites were manually edited.
* | | | | | | | | | | | | | | | | | | | Move InventoryURL converer to the converters fileGravatar Numerlor2020-11-10-21/+22
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Simplify duplicate symbol name handling codeGravatar Numerlor2020-11-10-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the catchall else condition and symbols from FORCE_PREFIX_GROUPS getting renamed even when being overwritten, we can ignore the package handling and let it go to the else which adds the package prefix instead of a group
* | | | | | | | | | | | | | | | | | | | Add package in front of symbol as default fallbackGravatar Numerlor2020-11-10-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously weo nly added the package name for symbols that shared are named name with an another symbol, but in some edge cases we can get to this point with symbols that weren't renamed but have name conflicts, causing some to get overwritten completely without the capturing condition
* | | | | | | | | | | | | | | | | | | | Cache user fetched symbols through redis.Gravatar Numerlor2020-11-10-2/+43
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Handle escaped backslashes in stringsGravatar Numerlor2020-10-18-3/+3
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Exclude headerlinks outside of current sectionGravatar Numerlor2020-10-10-9/+13
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Use more descriptive name for end_tag_filterGravatar Numerlor2020-10-10-5/+5
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Handle non dt fallback together with modulesGravatar Numerlor2020-10-10-6/+1
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Merge remote-tracking branch 'upstream/master' into doc-impGravatar Numerlor2020-10-10-3617/+2635
|\| | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | Merge pull request #1165 from RohanJnr/smart_syncing_usersGravatar Mark2020-10-08-74/+144
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smart syncing of Users
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into smart_syncing_usersGravatar Mark2020-10-08-19/+48
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | Merge pull request #1220 from python-discord/purgebanGravatar scragly2020-10-09-2/+26
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into purgebanGravatar scragly2020-10-09-17/+22
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Merge pull request #1222 from python-discord/fix-ping-processing-timeGravatar scragly2020-10-09-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix millisecond time for command processing time
| | * | | | | | | | | | | | | | | | | | | | | Fix millisecond time for command processing timeGravatar Gustav Odinger2020-10-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - For the `.ping` command - Fixes a faulty convertion from seconds to milliseconds
| * | | | | | | | | | | | | | | | | | | | | | PR #1209: Improve 'send_attachments'Gravatar kwzrd2020-10-08-16/+21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | Allow kwargs and set `use_cached` to False by default.
| | * | | | | | | | | | | | | | | | | | | | | made sure to use sub_clyde on username passed to send_attachmentsGravatar wookie1842020-10-07-1/+2
| | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | Changed dm_relay to include user id in webhook when sending attachments.Gravatar wookie1842020-10-02-1/+5
| | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | Add use_cached argument to send_attachments, and change it to default to FalseGravatar wookie1842020-10-02-1/+2
| | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | Changed send_attachments so kwargs could be given and would be passed to send()Gravatar wookie1842020-10-02-14/+13
| | | | | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | | Update bot/exts/moderation/infraction/infractions.pyGravatar scragly2020-10-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Dennis Pham <[email protected]>
| | | * | | | | | | | | | | | | | | | | | | | Add the ability to purge and ban in one command.Gravatar scragly2020-10-07-2/+26
| | |/ / / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | update documentationGravatar RohanJnr2020-10-08-1/+14
| | | | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | remove redundant if statementGravatar RohanJnr2020-10-08-1/+1
| | | | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | remove redundant if statementGravatar RohanJnr2020-10-08-2/+1
| | | | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | Merge branch 'smart_syncing_users' of https://github.com/RohanJnr/bot into ↵Gravatar RohanJnr2020-10-07-14/+60
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smart_syncing_users
| | | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into smart_syncing_usersGravatar Rohan Reddy Alleti2020-10-07-14/+60
| | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | Merge pull request #1218 from Numerlor/gitignore-logGravatar Dennis Pham2020-10-06-0/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | Include rolled over bot logs in gitignore
| | * | | | | | | | | | | | | | | | | | | | | Merge branch 'master' into gitignore-logGravatar Dennis Pham2020-10-06-2/+50
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | PR #1216 Starify: correctly show old nickGravatar kwzrd2020-10-06-2/+3
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | |