aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | | | | | | | | | | * | | | | | | | | | | 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.
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(bot): statds pr review suggestionsGravatar Thomas Petersson2020-11-09-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(bot): better fallback logicGravatar Thomas Petersson2020-10-05-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(bot): refactor of connect_statsdGravatar Thomas Petersson2020-10-05-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(bot): redundant false checks on self.statsGravatar Thomas Petersson2020-10-05-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(bot): Not assign stats to NoneGravatar Thomas Petersson2020-10-05-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.stats is referred to as bot.stats in the project, which was overlooked. This should "disable" stats until it's successfully reconnected. The retry attempts will continue until it stops throwing or fails 10x
| | | | | | | | | | | | | | | | | | | | | | | | | * fix(statsd): Gracefully handle gaierroGravatar Thomas Petersson2020-10-05-4/+30
| |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per issue #1185 the bot might go down if the statsd client fails to connect during instantiation. This can be caused by an outage on their part, or network issues. If this happens getaddrinfo will raise a gaierror. This PR catched the error, sets self.stats to None for the time being, and handles that elsewhere. In addition a fallback logic was added to attempt to reconnect, in the off-chance it's a temporary outage
* | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #1211 from python-discord/Den4200/fix/rulesGravatar Mark2020-10-04-12/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Improvements for the rules command
| * | | | | | | | | | | | | | | | | | | | | | | | Sort rules before determining invalid indices.Gravatar Den42002020-10-04-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to avoid sorting twice - once for invalid indices and again for send the rules.
| * | | | | | | | | | | | | | | | | | | | | | | | Use `url` argument instead of setting it outside.Gravatar Den42002020-10-03-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Use `Greedy` converter instead of the splat operator.Gravatar Den42002020-10-03-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Remove duplicates from given rule indices and sort them in order.Gravatar Den42002020-10-03-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Replace `map` with a more pythonic list comprehension.Gravatar Den42002020-10-03-1/+1
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | PR #1196: Bump 'discord.py` to 1.5 & use intentsGravatar kwzrd2020-10-04-165/+27
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | Use invite for tracking offline presences instead of `ctx`Gravatar Senjan212020-10-03-2/+2
| | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | Add trailing comma to intentsGravatar Senjan212020-10-03-1/+1
| | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | Merge branch 'master' into discordpy-15Gravatar Senjan212020-10-03-242/+151
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | | | | | | | | | | | | add missing test for `user` commandGravatar Senjan212020-10-03-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Add missing blank line to satisfy the linting godsGravatar Senjan212020-10-02-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Remove presence stat tracking.Gravatar Senjan212020-10-02-35/+2
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Remove failing unit testsGravatar Senjan212020-10-02-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing `information` cog seems redutant as it is not too important part of the bot.
| * | | | | | | | | | | | | | | | | | | | | | | | update member status info in `server` commandGravatar Senjan212020-09-30-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Remove Custom Status and Status from `create_user_embed`Gravatar Senjan212020-09-30-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Add intents setup to the botGravatar Senjan212020-09-30-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | Deps: bump 'discord.py' to 1.5 & re-lockGravatar kwzrd2020-09-29-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also removes a duplicate 'discord' entry from the lockfile.
* | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #835 from python-discord/bug/util/795/reminders-dupe-deleteGravatar Mark2020-10-03-100/+265
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Fix reminders sending duplicate DELETE request and cancelling themselves
| * | | | | | | | | | | | | | | | | | | | | | | | Merge remote-tracking branch 'origin/master' into ↵Gravatar MarkKoz2020-10-03-3533/+3101
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug/util/795/reminders-dupe-delete
* | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #1210 from python-discord/joseph/add-socket-statsGravatar Joe Banks2020-10-03-5/+37
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a socket stats command
| * | | | | | | | | | | | | | | | | | | | | | | | | Cap most_common to 25 to not go over the embed fields limitGravatar Joe Banks2020-10-03-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | | Add a socket stats commandGravatar Joe Banks2020-10-03-5/+37
|/ / / / / / / / / / / / / / / / / / / / / / / / /
* | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #1207 from hedythedev/masterGravatar Dennis Pham2020-10-02-6/+6
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typos in docstrings and comments
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into masterGravatar Dennis Pham2020-10-02-130/+88
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #1208 from python-discord/reminder-no-mentionGravatar Mark2020-10-02-4/+5
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | Reminder: no feedback message when no mention is used
| * | | | | | | | | | | | | | | | | | | | | | | | | Reminder: no feedback message when no mentionGravatar Matteo Bertucci2020-10-02-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #860 from ks129/discord-py-upgrade-migrateGravatar Joe Banks2020-10-02-122/+77
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discord.py 1.3.x Functionality Migrating
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into discord-py-upgrade-migrateGravatar MarkKoz2020-10-02-5710/+11177
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | | Merge pull request #1205 from soumitradev/source_escape_markdownGravatar Matteo Bertucci2020-10-02-2/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Escape markdown in faulty source commands
| * | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch 'master' into source_escape_markdownGravatar Soumitra Shewale2020-10-02-2/+2
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | | PR #1206 PEPs: move URL link to titleGravatar kwzrd2020-10-02-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \