| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
`has_active_infraction` tests: `ctx.send` and `bot.api_client.get` calling.
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
instead creating new one
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
(`self.bot.api_client.get`)
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
cases testing to test cases listing, added side_effect resetting.
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
created __init__.py for moderation tests
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Fixed errors.
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
created new params for tests class
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | |_|_|_|_|/ / /
| | | | | |/| | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Make their names more in line with `has_any_role` for consistency.
|
| | | | | | |_|_|_|_|/ / /
| | | | |/| | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
I've removed the unit tests for duckpond in concordance with the new
policy for writing unit tests for the bot The tests were unnecessarily
complicated, difficult to maintain, and slowed development.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
As we're now using the `async-rediscache` package, it's no longer
necessary to keep the `RedisCache` defined in `bot.utils.redis_cache`
around.
I've removed the file containing it and the tests written for it.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
|
| | | | |/ / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
I've migrated our redis caches over to the async-rediscache package that
we've recently released (https://git.pydis.com/async-rediscache). The
main functionality remains the same, although the package handles some
things, like getting the active session, differently internally.
The main changes you'll note for our bot are:
- We create a RedisSession instance and ensure that it connects before
we even create a Bot instance in `__main__.py`.
- We are now actually using a connection pool instead of a single
connection.
- Our Bot subclass now has a new required kwarg: `redis_session`.
- Bool values are now properly converted to and from typestrings.
In addition, I've made sure that our MockBot passes a MagicMock for the
new `redis_session` kwarg when creating a Bot instance for the spec_set.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
|
| | | | |\| | | | | | | |
|
| | | | | |\ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | |
|
| | | | | |/ / / / / / / |
|
| | | | | |\ \ \ \ \ \ \ |
|
| | | | | | |_|_|_|/ / /
| | | | |/| | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
326beebe9b097731a39ecc9868e5e1f2bd762aae
|
| | | | |\ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
# Conflicts:
# bot/utils/__init__.py
|
| | | | |\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | |_|_|_|_|/ / / /
| | | |/| | | | | | | | |
|
| | | |\ \ \ \ \ \ \ \ \ \
| | | | |_|_|/ / / / / /
| | | |/| | | | | | | | |
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
The point of format_user is to have a consistent format across the code
base. That should apply to tests too.
|
| | | |\ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | |
|
| | | |_|_|_|_|_|/ / / / /
| |/| | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Mocking the bot commands channel constant no longer worked after
switching to `in_whitelist_check`.
|
| | | |_|/ / / / / / / /
| |/| | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ \
| | | |/ / / / / / / /
| | |/| | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
It's clearer to write MAX_CHANNELS - 2 than a literal 48.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The test has to account for not only the name not matching, but also
a lack of available spaces for new channels.
|
| | | | | | | | | | | | |
|
| | | |\| | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | |\ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Add upstream changes & resolve config conflicts introduced by #1041.
In the conflicting parts of the diff, this commit also re-sorts
constants which were added upstream to lexicographical order.
This does **not** re-sort all constants added upstream.
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Suggested by Mark during review. If the download fails, we fallback
on showing an informative message, which will link the attachment
cdn link.
The attachment-handling logic was moved from the `archive` coroutine
into `make_embed`, which now also returns the file, if available.
In the end, this appears to be the smoothest approach.
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | |\ \ \ \ \ \ \ \ \ |
|