aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | | | | | | | 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
| | | |\ \ \ \ \ \ \ \ \ \
| | * | | | | | | | | | | | Corrected linting errors.Gravatar Daniel Brown2020-11-05-3/+2
| | |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Brown <[email protected]>
| | * | | | | | | | | | | - Added ping deletion time to config file.Gravatar Daniel Brown2020-11-05-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added ping message constant to the top of the voice_gate.py file. - Corrected logic error in checking if a user is cached and in a voice channel. - Reduced default message deletion time to 1 minute from 5 minutes. - Adjusted on_message event to ignore the verification ping message. Signed-off-by: Daniel Brown <[email protected]>
| | * | | | | | | | | | | Bug fixes, including improper cache calls, typos and moreGravatar Daniel Brown2020-11-03-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Corrected spelling on _async_init call - Changed the None value stored in the cache if the user is already verified to False, as RedisCache doesn't support None. - Changed RedisCache type hint to reflect change made in storage style - Suppress NotFound errors when the ping_message can't be retrieved. - Corrected lack of await on send call More fixes to come. Signed-off-by: Daniel Brown <[email protected]>
| | * | | | | | | | | | | Added ping message, message id storage and message deletionGravatar Daniel Brown2020-11-02-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Users who have never joined the voice channels before (and are currently unverified) will receive a ping in the #voice_verification channel - If user is unverified, the message id is stored in the cache along with the user id. - Added a message deletion to the voiceverify command, which removes the ping message if one exists. Also sets stored message ID to None so that it doesn't attempt to delete messages that aren't there - Set timed message deletion for 5 minutes.
| | * | | | | | | | | | | Added RedisCache and eventGravatar Daniel Brown2020-11-02-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added RedisCache instance as a class attribute of the VoiceGate cog. - Added voice_gate channel as an attribute to use it later in the cog. - Added cache type hint. Signed-off-by: Daniel Brown <[email protected]>
| | * | | | | | | | | | | Added method definition and needed imports.Gravatar Daniel Brown2020-10-30-1/+5
| | | |_|_|_|_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Brown <[email protected]>
| | | | | * | | | | | | Make `additional_info` non-optional.Gravatar kosayoda2020-10-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Optional` typehint suggests allowing None as a value, which does not make sense as a message in the logs.
| | | | | * | | | | | | Improve default argument.Gravatar kosayoda2020-10-08-4/+1
| | | | | | | | | | | |
| | | | | * | | | | | | Resolve logic error with reason override.Gravatar kosayoda2020-10-08-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason override for the user message should be set to the infraction reason *if* the override is None, not if it isn't. The parameter is also renamed to `user_reason` for better clarity.
| | | | | * | | | | | | Modify `!superstar` to use `apply_infraction`.Gravatar kosayoda2020-10-01-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `apply_infraction` from `InfractionScheduler` rather than doing it manually allows us to handle HTTP errors while reducing code duplication. Specifically, discord.Forbidden is handled when the bot tries to superstar someone they do not have permissions to. Resolves BOT-5Q.
| | | | | | | * | | | | fix(bot): PR reivew of bot.pyGravatar Thomas Petersson2020-11-27-8/+10
| | | | | | | | | | | |
| | | | | | | * | | | | Merge branch 'master' into fix/tagp/graceful-stasd-connectGravatar Thomas Petersson2020-11-09-907/+2421
| | | | | | | |\ \ \ \ \ | | |_|_|_|_|_|/ / / / / | |/| | | | | | | | | |
| | | | | | | * | | | | fix(bot): statds pr review suggestionsGravatar Thomas Petersson2020-11-09-6/+14
| | | | | | | | | | | |
| | | | | | | * | | | | fix(bot): better fallback logicGravatar Thomas Petersson2020-10-05-3/+3
| | | | | | | | | | | |
| | | | | | | * | | | | fix(bot): refactor of connect_statsdGravatar Thomas Petersson2020-10-05-9/+5
| | | | | | | | | | | |
| | | | | | | * | | | | fix(bot): redundant false checks on self.statsGravatar Thomas Petersson2020-10-05-11/+3
| | | | | | | | | | | |
| | | | | | | * | | | | fix(bot): Not assign stats to NoneGravatar Thomas Petersson2020-10-05-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.stats is referred to as bot.stats in the project, which was overlooked. This should "disable" stats until it's successfully reconnected. The retry attempts will continue until it stops throwing or fails 10x
| | | | | | | * | | | | fix(statsd): Gracefully handle gaierroGravatar Thomas Petersson2020-10-05-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per issue #1185 the bot might go down if the statsd client fails to connect during instantiation. This can be caused by an outage on their part, or network issues. If this happens getaddrinfo will raise a gaierror. This PR catched the error, sets self.stats to None for the time being, and handles that elsewhere. In addition a fallback logic was added to attempt to reconnect, in the off-chance it's a temporary outage
* | | | | | | | | | | | Restructure doc cache to handle caches of whole pagesGravatar Numerlor2020-12-11-61/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used packages as the top level keys and fields contained the url and the symbol id, however if we want to store all symbols from fetched pages instead of only the ones that were fetched by the users this comes worse off than using the page url in the field and setting EXPIREs for them instead of doing it manually in python. The new implementation uses package:url as the redis key and only the symbol id for field names, with the expire being set to a week on the key, this means we have to pattern match the keys when deleting the cache for a package but that's being done far less than the expire checking done previously.
* | | | | | | | | | | | Create a generator instead of returning a listGravatar Numerlor2020-12-09-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result of _split_parameters is only iterated over, so a list is not needed. Making it lazy may also save some time in cases where we don't use all parameters
* | | | | | | | | | | | Merge current_search and expected_end inGravatar Numerlor2020-12-09-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two variables were initialized and cleared together and contained related information
* | | | | | | | | | | | Improve handling of stringsGravatar Numerlor2020-12-09-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code assumed ' and " can be used interchangeably, and strings that were inside of brackets were ignored for depth but their contents weren't causing strings like "ab[cd" to increase the depth
* | | | | | | | | | | | Remove redundant suppressGravatar Numerlor2020-11-29-2/+2
| | | | | | | | | | | |
* | | | | | | | | | | | Various grammar and sentence structure changesGravatar Numerlor2020-11-29-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | | | Clear up docstring so it doesn't rely on private attributeGravatar Numerlor2020-11-29-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | | | Use pop instead of getitem and delGravatar Numerlor2020-11-29-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | | | Use timedelta instead of constructing duration manuallyGravatar Numerlor2020-11-29-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A newline was also added to set to keep it consistent with set_if_exists
* | | | | | | | | | | | Ensure packages from PRIORITY_PACKAGES are directly accessibleGravatar Numerlor2020-11-15-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some packages (currently only python) should be prioritised to others, the previous cleanup didn't account for other packages loading before it which resulted in duplicate symbols getting the python prefix and the original symbols linking to most probably undesired pages
* | | | | | | | | | | | Add command for clearing the cache of packagesGravatar Numerlor2020-11-15-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We also clear the cache when removing a package
* | | | | | | | | | | | Update existing redis values when parsing pagesGravatar Numerlor2020-11-15-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're parsing a page for a symbol that's out of the cache and encounter a symbol that was already cached we can update that symbol to keep it up to date without additional requests
* | | | | | | | | | | | Rework the doc redis cache to work with hashesGravatar Numerlor2020-11-15-12/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rework requires us to delete packages caches easily with deleting the package hash instead of having to pattern match all keys and delete those. The interface was also updated to accept DocItems instead of requiring callers to construct the keys
* | | | | | | | | | | | Limit newlines in doc descriptionsGravatar Numerlor2020-11-15-16/+32
| | | | | | | | | | | |
* | | | | | | | | | | | Intern relative url pathsGravatar Numerlor2020-11-15-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Group name interning was also moved to the DocItem creation to group the behaviour
* | | | | | | | | | | | Cancel scheduled inventory updates on all refreshesGravatar Numerlor2020-11-15-6/+2
| | | | | | | | | | | |
* | | | | | | | | | | | Adjust unparseable symbol behaviourGravatar Numerlor2020-11-15-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With redis we need to make sure we don't send the "error" string into the cache, returning None instead of the string and then setting it manually in the caller makes this nicer compared to checking against a string
* | | | | | | | | | | | Update outdated docstringGravatar Numerlor2020-11-15-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Rename variables for clarityGravatar Numerlor2020-11-15-11/+11
| | | | | | | | | | | |
* | | | | | | | | | | | Generalise tag filter hint to accept all containersGravatar Numerlor2020-11-10-5/+5
| | | | | | | | | | | |
* | | | | | | | | | | | Relock Pipfile.lockGravatar Numerlor2020-11-10-298/+136
| | | | | | | | | | | |
* | | | | | | | | | | | Merge remote-tracking branch 'upstream/master' into doc-impGravatar Numerlor2020-11-10-782/+2177
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # LICENSE-THIRD-PARTY # bot/exts/info/doc.py
| * | | | | | | | | | | 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