| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
See `make_embed` docstring for further information.
The tests are fairly loose and should be easily adjustable in
the future should changes be made.
|
| |
|
|
| |
This is an important piece of information that shall be relayed.
|
| |
|
|
|
|
|
|
|
|
| |
Decision was made to use embeds to archive incidents instead of
webhooking the raw message. As such, we're reverting the branch
to a state from which the adjustments will be easier to make.
Reverted commits:
* a8d179d9b04f54b20c5e870bcfa85c78c42c8dca
* 6fa8caed037b247a7c194f58a4635de7dae21fd2
|
| |
|
|
|
|
|
| |
Incident author and the moderator who actioned report are now passed
through `make_username` to create the webhook username.
Tests adjusted as appropriate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The justification is to incorporate the `actioned_by` name into the
username in some way, and so the logical thing to do is to abstract
this process into a helper so that it can easily be adjusted in the
future. For now, I've chosen to separate the names by a pipe.
Discord webhook username cannot exceed 80 characters in length, and
so we cap it at this length by default. This is seen as more of an
edge-case, but it should be accounted for, as we're not joining two
names. The `max_length` param is configurable primarily for testing
purposes, it probably should never be passed explicitly.
This commit also provides two tests for the function.
|
| |
|
|
| |
See: a8b4e394d9da57287cd9497cd9bb0a97fa467e84
|
| |
|
|
|
|
|
| |
With PR #1009 merged, we now apply the same fix to our relay function.
This prevents the "clyde" word from sneaking into the webhook username,
which is forbidden and will return a 400.
|
| |\
| |
| |
| | |
Adds the `sub_clyde` function, which we'll apply to our webhook.
|
| | |\
| | |
| | | |
Fix 400 when "clyde" is in any webhook username
|
| | | |\
| | |/
| |/| |
|
| | |\ \
| | | |
| | | | |
Add Pipenv script for html coverage report
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Similarly to the `report` script, this removes the need to invoke
coverage when generating the html report.
|
| | |\ \ \
| | |/ /
| |/| |
| | | |
| | | | |
python-discord/bug/filters/bot-58/removers-ignore-dms
Ignore DMs in token and webhook removers
|
| | | |\ \
| | |/ /
| |/| | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Can't remove messages in DMs, so don't bother trying.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
It just makes more sense to me to filter out messages at an earlier
stage.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
It's a private channel so there's no risk of a token "leaking".
Furthermore, messages cannot be deleted in DMs.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
The Cyrillic characters are more likely to be rendered similarly to
their Latin counterparts than the math sans-serif characters.
|
| | | | |
| | | |
| | | |
| | | | |
Discord just disallows this name.
|
| | | | |
| | | |
| | | |
| | | | |
This is already being patched at class-level.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Suggested by Mark during review. This follows the "ask for forgiveness
rather than permission" paradigm, ends up being less code to read, and
may be seen as more logical / safer.
The `ALLOWED_EMOJI` set was renamed to `ALL_SIGNALS` as this now better
communicates the set's purpose.
Tests adjusted as appropriate.
Co-authored-by: MarkKoz <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using `issubset` is a much simpler & more readable way of expressing
the relationship between the two sets.
Suggested by Mark during review.
Co-authored-by: MarkKoz <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Requested during review.
Co-authored-by: ks129 <[email protected]>
Co-authored-by: Joseph Banks <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Suggested by Mark during review.
Co-authored-by: MarkKoz <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pointed out by Mark during review that this is unnecessary, as logging
using `exception` automatically appends the `exc_info` of the handled
exception when done in an except block.
Co-authored-by: MarkKoz <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is way too spacious for how little is happening here.
Suggested by ks129.
Co-authored-by: ks129 <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Caught during review by ks129.
Co-authored-by: ks129 <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was originally in place to silence a PyCharm warning regarding
accessing the private attributes.
However, since there is no corresponding error code to specify,
the noqa will silence any linter warning, which is potentially
dangerous, and seems to be bad practice.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Logs useful when observing the internals but too verbose for DEBUG are
reduced to TRACE.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See the docstring. This does not make the ambition to be powerful
enough to be included in `tests.helpers`, and is only intended
for local purposes.
|
| |\| | | |
|
| | |\ \ \
| | | | |
| | | | | |
#364 offensive msg autodeletion
|
| | | | | | |
|
| | | |\ \ \
| | |/ / /
| |/| | | |
|
| | |\ \ \ \
| | | | | |
| | | | | | |
Create cooldown.md
|
| | | | | | |
| | | | | |
| | | | | | |
Co-authored-by: Mark <[email protected]>
|
| | | |\ \ \ \ |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: Mark <[email protected]>
|
| | | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: Joseph Banks <[email protected]>
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Apply suggestions from code review
Co-authored-by: Joseph Banks <[email protected]>
|