| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
| |
This also breaks the helpers import statement into a vertical list,
as the amount of imports has grown too much. I still believe that
this is a preferred alternative to accessing the helpers via module
namespace, as we use them a lot, and the added visual noise would
be annoying to read - their names are already descriptive enough.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We do not wish to log 404 exceptions as those are expected, however,
if something else goes wrong, we shouldn't silence it.
This also removes the explicit None return as it only adds syntax
noise.
|
| | |
|
| |
|
|
| |
This will be useful for others tests as well.
|
| | |
|
| |
|
|
|
|
|
| |
For cleanliness, I've decided to make a separate class for each method.
Since most tests will want to have an `Incident` instance ready, they
can inherit the `setUp` from `TestIncidents`, which does not make any
assertions on its own.
|
| |
|
|
|
| |
Let's make it clear that this is our own mock. We also move the
definition to the top of the module.
|
| |
|
|
|
| |
No reason to build own MagicMocks as we already have helpers that
more accurately mimic the mocked behaviour.
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| | |
The site's description still stated that it was built with Flask, which
is no longer accurate due to the move to Django.
|
| | |\
| | |
| | | |
Filtering: Implement bad words detection in nicknames
|
| | | |\
| | |/
| |/| |
|
| | | |\ |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | | |
Co-authored-by: Joseph Banks <[email protected]>
|
| | | | |
| | | |
| | | | |
Co-authored-by: Joseph Banks <[email protected]>
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When cogs reload, it would consider their namespace as a conflict with
the original namespace. This feature will be removed as a fix until we
come up with a better solution.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
- Use UTC from timestamp
- Rename name bad words checking function
|
| | | | |
| | | |
| | | | |
Co-authored-by: Mark <[email protected]>
|
| | | |\ \ |
|
| | | | | |
| | | | |
| | | | | |
Move lock creation from `bad_words_in_name` to `__init__`
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | |/ / |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Make `bad_words_in_name` and attach it to current `on_message`.
- Implement `asyncio.Lock` to avoid race conditions.
- Made that this first check is there matches and when there is,
check for alert.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This adds a proper class docstring & small touch-ups to local
comments where necessary.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This contains the main logic for handling reactions and glues all the
helpers together.
Unfortunately, gracefully handling everything that can go wrong in
the process requires quite a lot of code ~ but, at least to me, it
seems like this all should now be fairly safe.
The idea to await the message delete event before releasing the lock
was conceived by Ves, while Mark helped me refine it.
Co-authored-by: Sebastiaan Zeeff <[email protected]>
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
See docstring!
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See docstring. The exception log is DEBUG level as failure does not
necessarily indicate that we have done something wrong. We rely on
the API to tell us that the message no longer exists in situations
where we have 2 coroutines racing to archive the same message.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The crawler now avoids making API calls for messages which:
* Are not incidents
* Already have all signals
As a result, we can sleep only after making actual calls. This speeds
up the task completion considerable, while also making it lighter
on the API. Victory!
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Looks like we'll need quite a few helpers, and I think it's cleaner
to keep them at module level.
It helps avoid the question of: what do I do if a staticmethod
depends on another staticmethod?
|
| | | | | |
|
| | | | | |
|