| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| |/ / / / / |
|
| | | | | | |
|
| | |\ \ \ \ |
|
| | |/| | | |
| | | | | |
| | | | | |
| | | | | | |
python-discord-master
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
See issue #382
|
| | |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/python-discord/bot/issues/293
The rich embed filter is plagued by false positives now Discord has
added more custom preview embeds for various websites. Since these
embeds have the `rich` type instead of the `link` type, these embeds
triggered the filter we had in place.
This commit remedies that by using the existing URL regex pattern to
list all the URLs contained in the message content and then checking
if the embed url is a member of that list. If so, it's very likely
that the embed was auto-generated from that URL, so we should ignore
it. This approach deviates slightly from that outlined in #293.
This does increase the probability of a false-negative, as a "true"
user-generated rich embed could also have a url that's contained in
the message body. However, I've checked most of the triggers we have
had in the past and none of the legitimate triggers would have been a
false-negative under the new rules. Therefore, I think it's very
reasonable to adopt this strategy.
In addition to the change in behavior of the rich embed filter, I
have also kaizened the existing regex patterns by compiling them at
load time. Since we check a lot of regex patterns for every message
received by the bot, this should be beneficial for performance.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
After a short discussion in the core-dev team, we decided to not use
retry logic for a failed API call for new off-topic-names. We may
introduce something similar in the future, but we're not sure on the
direction we want to take yet.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | | |
If an exception occurred
|
| | | | | |
| | | | |
| | | | | |
`bot.api.ResponseCodeError` is now imported
|
| | | | |\ \
| |_|_|/ /
|/| | | | |
|
| |\ \ \ \ \
| |_|/ / /
|/| | | | |
Fix failing duration conversion
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In this commit, I've restructured the Duration converter's docstring
to a more readable format: a bullet point list.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/python-discord/bot/issues/446
After review feedback and a discussion in the dev-core team, I've
changed a couple of things:
- Allow a space between amount and unit in the duration string;
- Allow a space between different units in the duration string;
- Remove the old ExpirationDate converter completely;
- Remove the dependency `dateparser` from the Pipfile;
- Update tests for the two types of optional spaces;
- Change the test for valid cases to a more readable format;
This PR closes #446
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/python-discord/bot/issues/446
The current ExpirationDate converter does not convert duration strings
to `datetime.datetime` objects correctly. To remedy the problem, I've
written a new Duration converter that uses regex matching to extract
the relevant duration units and `dateutil.relativedelta.relativedelta`
to compute a `datetime.datetime` that's the given duration in the
future.
I've left the old `ExpirationDate` converter in place for now, since
the new Duration converter may not be the most optimal method. However,
given the importance of being able to convert durations for moderation
tasks, I think it's better to implement Duration now and rethink the
approach later.
This commit closes #446
|
| | | | | |
|
| | |/ /
|/| |
| | |
| | | |
This allows to keep the task running even if the call fail.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Make DEFCON days subcommand enable DEFCON
Co-authored-by: Joseph <[email protected]>
Co-authored-by: null <[email protected]>
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \
| |_|_|/
|/| | | |
Update linting
|
| | | | |
| | | |
| | | |
| | | | |
Co-Authored-By: Mark <[email protected]>
|
| | | | |
| | | |
| | | | |
Co-Authored-By: Mark <[email protected]>
|
| | |\ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | | |
Co-Authored-By: Leon Sandøy <[email protected]>
|
| | | | |
| | | |
| | | |
| | | | |
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | | | |
| | | |
| | | | |
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | | | | |
|
| | | | |
| | | |
| | | | |
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Fix decorator return hints
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | |\ \ \ |
|
| | |\ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Whew
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Add flake8-annotations
* Add flake8-docstrings
|
| | | | | | | |
|
| | | | | |\ \
| |_|_|_|/ /
|/| | | | | |
|
| | |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The infraction search feature did not work because of a small bug with
the date formatting: `datetime.fromisoformat` does not like the Z at
the end of the datestring the database sends back, so we need to chop
it off. I've applied the same method for doing that as already in use
in other parts of the bot codebase.
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Add tests for `bot.rules.attachments`.
|
| |/ / / / /
| | | | |
| | | | |
| | | | | |
This also fixes an issue with the `attachments` rule not respecting the most recent message sent by a user.
|