| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Moderation notifications are no longer sent so that doesn't need to be
tested.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
It's a more accurate name since it also reschedules unsilences now.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Can be used to support rescheduling.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Admins will have to manually check the default values used and adjust
them if they aren't the desired values for that particular channel.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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 typo on the traceback tag
|
| |/
|
| |
See issue #1101
|
| |\
| |
| | |
Remove api endpoint config values.
|
| | |\
| |/
|/| |
|
| | | |
|
| | | |
|
| |/
|
|
|
| |
The constants aren't used anywhere in the bot,
and are incompatible with the APIClient.
|
| |\
| |
| |
| |
| | |
python-discord/bug/filters/1027/ignore-webhook-names
Ignore webhooks for nickname filter
|
| | |\
| |/
|/| |
|
| |\ \
| | |
| | | |
Utils: show error message for long poll titles
|
| | |\ \
| |/ /
|/| | |
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
Help channel message pin fixes
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \ |
|
| | |\ \ \ \
| |/ / / /
|/| | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Deps: update discord.py to 1.4.0
|
| |/ / / / /
| | | | |
| | | | |
| | | | | |
It was released on PyPI. No longer need to clone via git.
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
python-discord/bug/backend/1080/cog-reload-cancel-scheduler
Cancel scheduled tasks when cogs unload
|
| | |\ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | | |
RedisCache: remove erroneous `_redis` alias
|
| | |\ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Source: raise BadArgument for dynamically-created objects
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The code is identical to the else block and there's no reason for
help commands to have an explicit check.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Commands, cogs, etc. created via internal eval won't have a source file
associated with them, making source retrieval impossible.
Fixes #1083
Fixes BOT-7K
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This reverts commit 59c62162
|
| |\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
HelpChannels: use more reliable check for claimed channel
|
| | |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If a RedisCache instance was being accessed before bot has created
the `redis_cache` instance, the `_redis` alias was being set to
None, causing AttributeErrors in lookups.
See: #1090
|