aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | | | CI: invalidate dependency cacheGravatar kwzrd2020-11-11-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The cache became corrupted for reasons what we were not able to figure out, causing the pre-commit step to fail when the environment was retrieved from the cache. By changing the key, we force cache rebuild.
| * | | Merge CI changes from 'master' branchGravatar kwzrd2020-11-10-5/+9
| |\ \ \ | |/ / / |/| | |
* | | | Merge pull request #1273 from ↵Gravatar Dennis Pham2020-11-08-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | python-discord/sebastiaan/bugs/codeblock-language-detection Detect codeblock language specifiers with special characters
| * \ \ \ Merge branch 'master' into sebastiaan/bugs/codeblock-language-detectionGravatar Dennis Pham2020-11-08-1/+5
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Merge pull request #1148 from Jack92829/masterGravatar Senjan212020-11-07-0/+3
|\ \ \ \ \ | | | | | | | | | | | | New guilds tag
| * | | | | Update guilds.mdGravatar Jack928292020-09-29-3/+2
| | | | | | | | | | | | | | | | | | Not to sure of the title to give it but I think the content is a bit more in line with the servers other tags
| * | | | | Update guilds.mdGravatar Jack928292020-09-26-4/+3
| | | | | |
| * | | | | Merge branch 'master' into masterGravatar Matteo Bertucci2020-09-23-2462/+2436
| |\ \ \ \ \
| * | | | | | Update guilds.mdGravatar Jack928292020-09-06-1/+1
| | | | | | |
| * | | | | | Update and rename ServersTag.md to guilds.mdGravatar Jack928292020-09-06-5/+5
| | | | | | |
| * | | | | | Add files via uploadGravatar Jack928292020-09-06-0/+5
| | | | | | |
* | | | | | | Merge pull request #1219 from python-discord/bug/ci/cache-continue-on-errorGravatar Senjan212020-11-07-1/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | CI: avoid failing whole job if a cache task fails
| * | | | | | | CI: avoid failing whole job if a cache task failsGravatar MarkKoz2020-10-06-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restoring from cache is non-critical. The CI can recover if cache tasks fail.
| | | | * | | | Detect codeblock language with special charactersGravatar Sebastiaan Zeeff2020-11-06-1/+1
| |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regex we use to detect codeblocks did not recognize language specifiers that use a dash, a plus, or a dot in their name. As there are valid language specifiers, such as python-repl and c++, that use those characters, I've changed the regex to reflect that. The character set used now reflects the characters used in language specifiers in highlight.js. Signed-off-by: Sebastiaan Zeeff <[email protected]>
* | | | | | | Merge pull request #1271 from spacecraft1013/code_instructionsGravatar Dennis Pham2020-11-06-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | ```py convention in code block instructions
| * \ \ \ \ \ \ Merge branch 'master' into code_instructionsGravatar Dennis Pham2020-11-06-105/+169
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #1266 from zachgates/patch-1Gravatar Senjan212020-11-06-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Updated langs to include python-repl
| * | | | | | | | Reinsert python-repl in PY_LANG_CODESGravatar Zach Gates2020-11-01-1/+1
| | | | | | | | |
| * | | | | | | | Updated langs to include python-replGravatar Zach Gates2020-11-01-1/+1
| | | | | | | | |
| | * | | | | | | Modified instructions for code block without langGravatar Amin Boukari2020-11-05-1/+1
| | | | | | | | |
| | * | | | | | | Changed ```python to ```pyGravatar Amin Boukari2020-11-05-1/+1
| | | | | | | | |
| | | | | | * | | Voice Gate: explain the purpose of `NO_MSG`Gravatar kwzrd2020-11-10-0/+4
| | | | | | | | |
| | | | | | * | | Voice Gate: ensure atomicity when notifying usersGravatar kwzrd2020-11-10-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| | | | | | * | | Voice Gate: define atomic `_delete_ping` functionGravatar kwzrd2020-11-10-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| | | | | | * | | Voice Gate: correct after-delay message delete methodologyGravatar kwzrd2020-11-09-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a HTTP method so that we do not have to fetch the message object, the cache only gives us the ID.
| | | | | | * | | Voice Gate: correct HTTP delete method usageGravatar kwzrd2020-11-09-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need to fetch the Channel object. Add a trace log to help with testing.
| | | | | | * | | Voice Gate: refer to config rather than hard-coded durationGravatar kwzrd2020-11-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The const was introduced for this purpose, but it was accidentally not being used.
| | | | | | * | | Voice Gate: fix cache membership checkGravatar kwzrd2020-11-08-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | | | | * | | Voice Gate: one-line func signatureGravatar kwzrd2020-11-08-7/+2
| | | | | | | | |
| | | | | | * | | Added dummy parameter, changed message delete logicGravatar Daniel Brown2020-11-08-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 extra else's and added constantGravatar Daniel Brown2020-11-06-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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]>
| | | | | | * | | Requested fixes - Various restructures of code.Gravatar Daniel Brown2020-11-06-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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]>
| | | | | | * | | Merge remote-tracking branch 'origin/Hemlock/voice-gate-ping' into ↵Gravatar Daniel Brown2020-11-05-108/+175
| | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hemlock/voice-gate-ping
| | | | | | | * \ \ Merge branch 'master' into Hemlock/voice-gate-pingGravatar Daniel Brown2020-11-05-108/+175
| | | | | | | |\ \ \ | |_|_|_|_|_|_|/ / / |/| | | | | | | | |
* | | | | | | | | | Merge pull request #901 from ks129/pep-improvisationsGravatar Senjan212020-11-05-104/+168
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | PEP command improvements
| * | | | | | | | | Fix argument offsetGravatar ks1292020-10-18-1/+1
| | | | | | | | | |
| * | | | | | | | | Refactor PEP error embed sendingGravatar ks1292020-10-18-23/+24
| | | | | | | | | |
| * | | | | | | | | Merge remote-tracking branch 'up/master' into pep-improvisationsGravatar ks1292020-10-18-642/+1078
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into pep-improvisationsGravatar ks1292020-10-04-943/+553
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Move AsyncCache max_size argument to __init__ from decoratorGravatar ks1292020-10-04-3/+4
| | | | | | | | | | | |
| * | | | | | | | | | | Make AsyncCache key tuple instead stringGravatar ks1292020-10-04-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Move PEP URLs to class constantsGravatar ks1292020-10-04-7/+6
| | | | | | | | | | | |
| * | | | | | | | | | | Rename async cache instancesGravatar ks1292020-10-04-7/+5
| | | | | | | | | | | |
| * | | | | | | | | | | Fix lintingGravatar ks1292020-09-26-3/+2
| | | | | | | | | | | |
| * | | | | | | | | | | PEP: Split get_pep_embed to smaller partsGravatar ks1292020-09-26-22/+34
| | | | | | | | | | | |
| * | | | | | | | | | | Async Cache: Create class-based async cacheGravatar ks1292020-09-26-24/+37
| | | | | | | | | | | |
| * | | | | | | | | | | Merge remote-tracking branch 'upstream/master' into pep-improvisationsGravatar ks1292020-09-26-4294/+8799
| |\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | PEP: Move PEP error message sending to another functionGravatar ks1292020-06-22-8/+9
| | | | | | | | | | | | |
| * | | | | | | | | | | | PEP: Filter out too big PEP numbersGravatar ks1292020-06-22-1/+5
| | | | | | | | | | | | |
| * | | | | | | | | | | | Async Cache: Make cache handle different caches betterGravatar ks1292020-06-22-7/+9
| | | | | | | | | | | | |