aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base.py (unfollow)
Commit message (Collapse)AuthorLines
2020-11-08Voice Gate: refer to config rather than hard-coded durationGravatar kwzrd-1/+1
The const was introduced for this purpose, but it was accidentally not being used.
2020-11-08Voice Gate: fix cache membership checkGravatar kwzrd-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.
2020-11-08Voice Gate: one-line func signatureGravatar kwzrd-7/+2
2020-11-08Added dummy parameter, changed message delete logicGravatar Daniel Brown-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.
2020-11-06Removed extra else's and added constantGravatar Daniel Brown-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]>
2020-11-06Requested fixes - Various restructures of code.Gravatar Daniel Brown-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]>
2020-11-05Corrected linting errors.Gravatar Daniel Brown-3/+2
Signed-off-by: Daniel Brown <[email protected]>
2020-11-05- Added ping deletion time to config file.Gravatar Daniel Brown-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]>
2020-11-03Bug fixes, including improper cache calls, typos and moreGravatar Daniel Brown-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]>
2020-11-02Added ping message, message id storage and message deletionGravatar Daniel Brown-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.
2020-11-02Added RedisCache and eventGravatar Daniel Brown-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]>
2020-11-01Actually fix the issue @kwzrd pointed outGravatar Joe Banks-3/+3
2020-11-01Correct 404 error message in voice gate commandGravatar Joe Banks-2/+2
2020-11-01Correct activity block config name in voice gate extensionGravatar Joe Banks-1/+1
2020-11-01Indent inline comment by two spaces in config-default.ymlGravatar Joe Banks-1/+1
2020-11-01Change wording of failure message and re-add trailing commaGravatar Joe Banks-1/+1
2020-11-01Remove full stopGravatar Joe Banks-1/+1
2020-10-31Add activity blocks threshold to voice gateGravatar Joe Banks-1/+4
2020-10-31Add new activity block constantGravatar Joe Banks-0/+2
2020-10-30Added method definition and needed imports.Gravatar Daniel Brown-1/+5
Signed-off-by: Daniel Brown <[email protected]>
2020-10-27Fix incorrect argument for _send_log when filtering evalsGravatar MarkKoz-1/+1
Fixes BOT-AN
2020-10-27"see here" -> "check this out"Gravatar Steele Farnsworth-1/+1
2020-10-26link to a page about finding the backtick key on different layouts.Gravatar Steele Farnsworth-1/+1
2020-10-26Made the message significantly shorterGravatar Steele-13/+3
2020-10-22Swapped individual channel ids for category id.Gravatar Daniel Brown-8/+4
Signed-off-by: Daniel Brown <[email protected]>
2020-10-22Update config-default.yml Gravatar Daniel Brown-1/+1
Changing a hyphen to an underscore in the config Co-authored-by: kwzrd <[email protected]>
2020-10-22Added voice_chat to eval listGravatar Daniel Brown-1/+9
Signed-off-by: Daniel Brown <[email protected]>
2020-10-22Update Python Discord badge to 100k members.Gravatar Dennis Pham-1/+1
2020-10-22Use FetchedMember for user annotationGravatar mbaruh-6/+7
2020-10-22Add handling of off-server users to user commandGravatar mbaruh-16/+23
2020-10-21Silence tests: update docstrings in notifier testsGravatar MarkKoz-2/+2
2020-10-21Relay python-dev to mailing lists channelGravatar Joe Banks-0/+1
2020-10-21Remove unnecessary getLogger callGravatar Numerlor-1/+0
2020-10-18Reminders: rename namespace constantGravatar MarkKoz-4/+4
It's better to have a self-documenting name than a comment, which, by the way, was using the old name for the decorator.
2020-10-18Silence: add locks to commandsGravatar MarkKoz-1/+9
2020-10-18Silence: rename function to reduce ambiguityGravatar MarkKoz-10/+10
2020-10-19Set logging level for async-rediscache to warningGravatar Numerlor-0/+1
2020-10-19Instruct to reconnect to voice channel if connected on verification.Gravatar scragly-0/+4
If a user is already connected to a voice channel at the time of getting verified through voice gate, they won't have their permissions actually apply to their current session. This change adds information on verifying so they know they must reconnect to have the changes apply.
2020-10-19Address a grammar error in failed reasons.Gravatar scragly-1/+1
An overlooked grammatical error occurred in exactly 1 (one) of the possible failure reasons when being verified for the voice gate system. This was unacceptable to the masses, so a swift correction has been added to address it, adding 1 (one) additional word to the listed reason.
2020-10-19Ensure verified users can see verified message.Gravatar scragly-4/+8
When verified users get their role, they cannot see the voice-verification channel anymore, so I've added a 3 second delay for granting the role in order to ensure there's some time for them to see the response. I've also moved the DM message to only be sent if the DM message succeeds, and to not mention them in-channel to avoid distracting them from the DM notification unnecessarily, as I'm sure they'll see a near-instant response to their command usage in that channel.
2020-10-19Disconnect users on voiceban.Gravatar scragly-0/+2
On voiceban, a users effective permissions will change to not allow speaking, however this permission isn't effective until rejoining. To ensure a voiceban is immediately in effect, the user will be disconnected from any voice channels.
2020-10-19Send response in verification if DM fails.Gravatar scragly-2/+8
At the moment, the bot will attempt to DM the verification result for a member which is reliant on privacy settings allowing member DMs. This commit should add a suitable fallback of sending the response in the voice-verification channel instead.
2020-10-18Use "failed" instead "not passed" for feedback embed of voice gate failGravatar ks129-1/+1
Co-authored-by: Joe Banks <[email protected]>
2020-10-18Fix grammar of voice unban embed descriptionGravatar ks129-1/+1
Co-authored-by: Joe Banks <[email protected]>
2020-10-18Fix grammar of voice verification config commentsGravatar ks129-2/+2
Co-authored-by: Joe Banks <[email protected]>
2020-10-18Use bullet points instead of - for voice verify failing reasonsGravatar ks129-1/+1
Co-authored-by: Joe Banks <[email protected]>
2020-10-18Remove too much aliases for voice verify commandGravatar ks129-1/+1
Co-authored-by: Joe Banks <[email protected]>
2020-10-18Remove test for case when user don't have VV for voice banGravatar ks129-8/+0
2020-10-18Fix too long lines for Voice GateGravatar ks129-2/+9
2020-10-18Use .title() instead of .capitalize()Gravatar ks129-1/+1