| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
It's not possible to test this via asserting the return value of
`on_message` since it never returns anything. Instead, the actual
relevant unit, `find_token_in_message,` should be tested.
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
This gives the caller more flexibility. Sometimes attribute names are
too long or they don't follow a naming scheme accepted by the linter.
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
This helper reduces redundancy/boilerplate by setting default values.
It also has the consequence of shortening the length of the invocation,
which makes it faster to use and easier to read.
|
| | | | | |_|_|/ / / / / /
| | | |/| | | | | | | | |
|
| | | |\ \ \ \ \ \ \ \ \ \
| | | |_|_|_|_|_|_|_|/ /
| | |/| | | | | | | | | |
Use Scheduler instead of asyncio.sleep on silence cog
|
| | | | | |_|/ / / / / /
| | | |/| | | | | | | |
|
| | | |\ \ \ \ \ \ \ \ \
| | | | |_|_|_|_|_|/ /
| | | |/| | | | | | | |
|
| | | | |\ \ \ \ \ \ \ \
| | | | | |_|_|/ / / /
| | | | |/| | | | | | |
|
| | | | | |\ \ \ \ \ \ \
| | | | | | |_|/ / / /
| | | | | |/| | | | | |
|
| | | | | | |\| | | | | |
|
| | | | | | | | | | | | |
|
| | | | | |\ \ \ \ \ \ \
| | | | | | |/ / / / /
| | | | | |/| | | | | |
|
| | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Replace `{"foo": "bar"}` with `{"id": 1}`
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
To allow `.get`, I had to replace `str` return value with `dict`
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | |\ \ \ \ \ \ \
| | | | | | | |/ / / / /
| | | | | | |/| | | | | |
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
- Remove unnecessary space from placeholder
- Rename `has_active_infraction` to `get_active_infraction`
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: Leon Sandøy <[email protected]>
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
removed unnecessary type hint and added comment to kick truncation test about awaiting `kick`.
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | |_|_|/ / /
| | | | | |/| | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
I wish this test didn't exist.
|
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The `msg` arg is for displaying a message when the assertion fails. To
match against the exception's message, `assertRaisesRegex` must be used.
Since all of the messages are meant to be interpreted literally rather
than as regex, `re.escape` is used.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | |/ / / / / / /
| | |/| | | | | | | |
|
| | |\| | | | | | | | |
|
| | | | | | | | | | | |
|
| | | | | | | | | | | |
|
| | | |_|_|_|_|/ / /
| |/| | | | | | | |
|
| | |_|_|_|_|/ / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The bot can get into trouble in three distinct ways:
- It has no Bot instance
- It has no namespace
- It has no parent instance.
These happen only if you're using it wrong. To make the test more
precise, and to add a little bit more readability (RuntimeError could be
anything!), we'll introduce some custom exceptions for these three
states.
This addresses a review comment by @aeros.
|
| | |\ \ \ \ \ \ \ |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This check was no longer being used anywhere, having been replaced by
in_whitelist_check.
|
| | | | | | | | | | |
|
| | | | |_|_|/ / /
| | |/| | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We're moving the actual predicate into the `utils.checks` folder, just
like we're doing with most of the other decorators. This is to allow us
the flexibility to use it as a pure check, not only as a decorator.
This commit doesn't actually change any functionality, just moves it
around.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Also added a test for this.
This is the DRYest approach I could find. It's a little ugly, but I
think it's probably good enough.
|