| Commit message (Collapse) | Author | Age | Lines |
| |\
| |
| |
| |
| | |
python-discord/Write-unit-tests-for-`bot/utils/time.py`
Added `unittest` for `bot.utils.time`
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Similar to `format_infraction_with_duration` ( if not outright copying it ), added 3 tests for `until_expiration`:
- None `expiry`.
- Custom `max_units`.
- Normal use cases.
|
| | |
| |
| |
| |
| |
| |
| | |
`format_infraction_with_duration`
- `until_expiration` was being a pain to unittests without a `now` ( default to `datetime.utcnow()` ). Adding an optional argument for this will not only make writing tests easier, but also allow more control over the helper function should we need to calculate the remaining time between two dates in the past.
- Changed typehint for `date_from` in `format_infraction_with_duration` to `Optional[datetime.datetime]` to better reflect what it is.
|
| | |\ |
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
context manager.
|
| | | | |
| | | |
| | | |
| | | | |
test case tests.
|
| | | | |
| | | |
| | | |
| | | | |
`test_parse_rfc1123`, fixed typo.
|
| | | | |
| | | |
| | | |
| | | | |
independent tests.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | | |
Revert "Use OAuth to be Reddit API compliant"
|
| |/ / / / |
|
| |\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | | |
Use OAuth to be Reddit API compliant
Co-authored-by: Jens <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: null <[email protected]>
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | | |
Display time left until expiration of infraction
Co-authored-by: null <[email protected]>
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \
| | | | |
| | | | | |
Allow "recent" as infraction ID for infraction edit command
|
| | |\ \ \ \
| |/ / / /
|/| | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Token and bad code
Co-authored-by: Daniel Brown <[email protected]>
Co-authored-by: Mark <[email protected]>
|
| | |\ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | | |
| | | | | |
| | | | | | |
Include the check about whether or not there is a token in the posted message in `parse_codeblock` boolean.
|
| | |\ \ \ \ \ |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | | |
fix linting error
|
| | | | | | | |
| | | | | | |
| | | | | | | |
After a new bunch of test I found bugs, and this fix resolves them
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Added a new function `is_token_in_message` in `token_remover`. This function returns a `bool` and if the code contains a token then the embed message about the poorly formatted code is not displayed.
|
| | | | |\ \ \ \
| |_|_|/ / / /
|/| | | | | |
| | | | | | | |
enh/mod/624/edit-recent-infraction
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Subclass Bot
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Active thread counts are observed to be lower with it in use.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
aiohttp throws a warning when a session is created outside of a running
async event loop. In aiohttp 4.0 this actually changes to an error
instead of merely a warning.
Since discord.py manages the event loop with client.run(), some of
the "internal" coroutines of the client were overwritten in the bot
subclass to be able to hook into when the bot starts and stops.
Sessions of both the bot and the API client can now potentially be None
if accessed before the sessions have been created. However, if called,
the API client's methods will wait for a session to be ready. It will
attempt to create a session as soon as the event loop starts (i.e. the
bot is running).
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Kick users from voice when they get muted
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix tag fallback not respecting checks
|
| |/ / / / / / / / / |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Only a warning is logged if it's a Forbidden error. Otherwise, the whole
exception is logged.
|
| |/ / / / / / / / |
|
| | | | | | | | | |
|