|  | Commit message (Collapse) | Author | Age | Lines | 
|---|
| ... |  | 
| | | | | |\ \ |  | 
| | | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | | Fixes a bug that stopped the duration `forever` from getting used as a
valid duration for silence.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |\ \ \ |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Updates the shh and unshh commands from the error handler to accept
channel and kick arguments, to give them the same interface as the
silence and unsilence command.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Updates the silence command to accept the silence duration or channel as
 the first argument to the command. Updates tests.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Uses `.format` to create silence and unsilence messages instead of
`.replace`.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |\ \ \ \ |  | 
| | | | | | |\ \ \ \ |  | 
| | | | | |/ / / / /  
| | | | | | | | |   
| | | | | | | | |   
| | | | | | | | |   
| | | | | | | | |   
| | | | | | | | | | Uses itertools.product to eliminate some nested for loops in tests.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | | Duplicates existing silence and unsilence cache tests for voice
 channels.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | 
| | | | | | | | | | Reduces the number of members created for each test to the bare minimum
required.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |\ \ \ \ \ |  | 
| | | | | |\ \ \ \ \ \ |  | 
| | | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | | Changes the mock used for creating an erroneous function in the silence
tests cog to use the side effect property instead of an extra function.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | | Removes redundant functionality from the `test_unsilence_helper_fail`
test as it is covered by another test. Keeps the functionality that
isn't being tested elsewhere.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | 
| | | | | | | | | | | | Combine two tests that are responsible for checking the silence helper
uses the correct channel and message.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |\ \ \ \ \ \ \ |  | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | | Adds a missing test assertion, and seperates the voice and text
components of a test.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | | Adds a missing test assertion, and seperates the voice and text
components of a test.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | 
| | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | |  | 
| | | | | |\ \ \ \ \ \ \ \  
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | | # Conflicts:
#	bot/constants.py | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | | Cleans up the tests related to the voice sync/kick functions by adding a
helper method to simplify mocking. | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | | Cleans up the silence tests by removing unneeded or repeated mocks.
Simplifies tests where possible by joining similar tests. | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | | Moves the tests for the helper method `send_message` to simplify tests,
and avoid repeated code. | 
| | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | 
| | | | | | | | | | | | | | Changes the signatures of a few helper methods to make them more
concise and understandable. | 
| | | | | |\ \ \ \ \ \ \ \ \  
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela<[email protected]>
# Conflicts
# bot/exts/moderation/silence.py
# bot/exts/moderation/test_silence.py | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Updates changes made in the PR to be more inline with style guide.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Refractors the voice sync helper function into two different functions,
one for each purpose. Moves the afk_channel get/creation code to its own
function. Updates tests.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Changes all usages of bot.constant to use dotted path to remove
confusion and namespace collision.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | VoiceChat sync only needs to be called when the command is invoked,
instead of while updating permissions. Moved call to command function to
 reflect that, and fixed failing tests.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Refractors the send message function in silence to make it more
understandable and flexible.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Co-authored-by: Mark <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Removes the AnyChannel converter in favor of a combination of Text and
Voice converters.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Adds tests for helper functions in the silence cog.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |\ \ \ \ \ \ \ \ \ \ |  | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | Adds an optional channel parameter to silence and unsilence commands,
and adds ability to silence voice channels.
TODO: New Tests
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | Fixes a bug where calling help with an invalid command would crash out
during fuzzy matching.
Signed-off-by: Hassan Abouelela <[email protected]> | 
| | | | | |_|_|_|_|_|_|_|_|/ /  
| | | |/| | | | | | | | | |   
| | | | | | | | | | | | | |   
| | | | | | | | | | | | | |   
| | | | | | | | | | | | | |   
| | | | | | | | | | | | | |   
| | | | | | | | | | | | | | | Renames a couple exceptions to include the error suffix, as enforced by
N818.
Signed-off-by: Hassan Abouelela <[email protected]> |