| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
```py convention in code block instructions
|
| | |\ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Updated langs to include python-repl
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Previously, the listener risked yielding control to a racing event at
multiple points between checking whether the member was already
notified, notifying them, and writing this information into the cache.
As a result, in a pathological case, multiple racing coroutines could
have passed the membership check and ping-spammed the user, before the
first coro could have a chance to write the message ID into the cache.
In this commit, we move this logic into an atomic helper, which will
ensure that events are processed one-by-one, and subsequent events
correctly abort.
Co-authored-by: MarkKoz <[email protected]>
Co-authored-by: Sebastiaan Zeeff <[email protected]>
Co-authored-by: Daniel Brown <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The code for ping deletion was duplicated in two places. In this commit,
we move it into a helper function, and apply a lock to make each
transaction atomic.
This means that if two coroutines try to call the function, the first
has to finish before the second can begin. This avoids the following:
Coro1: Message in cache? Yes.
Coro1: Send delete request. Yield control (await).
Coro2: Message in cache? Yes.
Now Coro2 has to wait for Coro1 to finish. Therefore it will always
find the `NO_MSG` signal, and not attempt the deletion.
Co-authored-by: MarkKoz <[email protected]>
Co-authored-by: Sebastiaan Zeeff <[email protected]>
Co-authored-by: Daniel Brown <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Use a HTTP method so that we do not have to fetch the message object,
the cache only gives us the ID.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This removes the need to fetch the Channel object. Add a trace log
to help with testing.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The const was introduced for this purpose, but it was accidentally
not being used.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Since the cache offers a 'contains' coro, let's use it.
If the member ID is already present in the cache, they were either
already verified, or were already pung about not being verified.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Added a None placeholder in the `__init__` for voice gate channel.
- Changed deletion logic in on_voice_state_update to check if the message has already been deleted.
- Changed deletion logic in voice_verify to only require one api call.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Removed unnecessary else statements
- Added NO_MSG constant to replace the `False` that was being used previously in the redis cache.
Signed-off-by: Daniel Brown <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Changed `VOICE_PING` constant to not contain the format brackets.
- Added more detailed description of what the `redis_cache` will hold.
- Changed message content verification to use the whole newly formatted `VOICE_PING` constant instead of a slice of it.
- Added remaining parameters for the `on_voice_state_update` event for clarity.
- Reorganized the logic of the `on_voice_state_update` for better clarity and better logging purposes.
- Removed `_async_init` in favor of checking if the guild is ready inside the `on_voice_state_update` event. Verification channel is now loaded each time when needed, reducing risk of the object becoming stale or erroring out due to the not being ready before an event was triggered.
Signed-off-by: Daniel Brown <[email protected]>
|
| | | | | | | |\ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Hemlock/voice-gate-ping
|
| | | | | | | | |\ \ \
| |_|_|_|_|_|_|/ / /
|/| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
PEP command improvements
|
| | | | | | | | | | | |
|
| | | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ |
|
| | |\ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Now PEP command request PEP listing when PEP is not found and last refresh was more time ago than 30 minutes instead task.
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Add `not` in check is key exist in cache.
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Added newline before logging after indention block.
Co-authored-by: Mark <[email protected]>
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Co-authored-by: Mark <[email protected]>
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Before this, all error embeds was returned on `get_pep_embed` but now this send this itself and return only correct embed to make checking easier in command.
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Moved `get_pep_zero_embed` back to the cog, but made this `staticmethod`.
|
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Use repo own alignment of multiline text.
|