| Commit message (Collapse) | Author | Age | Lines |
| |\ |
|
| | |\ |
|
| | | | |
|
| | |/ |
|
| | |\ |
|
| | | | |
|
| | |/ |
|
| | |\ |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is an optimization designed to eliminate all the list
comprehensions we were doing inside antimalware and filtering. The cache
is now structured so that the content is the key and the metadata is the
value.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Also updates the tests for this cog.
|
| | |/
|/| |
|
| | |
| |
| |
| | |
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.
|
| | | |\ |
|
| | | | | |
|
| | | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some of the tests were failing because they were expecting send_webhook
to be a method of the DuckPond cog, other tests simply were no longer
applicable, and have been removed.
https://github.com/python-discord/bot/issues/667
|
| | | |
| | |
| | |
| | | |
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]>
|
| | |\| |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |\ |
|
| | | | |\ |
|
| | | | | |\ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Remove embed attributes checks
- Replace `self.dev_log.assert_awaited_once_with` with `self.dev_log.assert_awaited_once`.
|
| | | | | |\ \ |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Need to compare the IDs against each other rather than the Guild object
against the ID.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
404s probably mean the user is from another guild.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | |\ \ \ \ \ |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
There is no handling of file types as explained in the `archive`
docstring. Testing indicates that relaying incidents with e.g. a text
file attachment is simply a noop in the Discord GUI.
If there is at least one attachment, we always only relay the one
at index 0, as it is believed the user-sent messages can only contain
one attachment at maximum.
This also adds an extra test asserting the behaviour when an incident
with an attachment is archived. The existing test for `archive` is
adjusted to assume no attachments.
Joe helped me conceive & test this.
Co-authored-by: Joseph Banks <[email protected]>
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This applies the previously defined `make_embed` function.
As the `archive` function is now simpler, I decided to reduce the
amount of whitespace ~ it's a lot more compact now.
Tests are adjusted as appropriate.
|