Implements Voice Channel Muting#1297
Conversation
Adds a converter that can decipher more forms of channel mentions, to lay foundation for voice channel muting. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
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 <47495861+HassanAbouelela@users.noreply.github.com>
- Allows spaces in channel name - Allows channel name to have any capitalization - Fixed inherited class to general Converter class Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Refactors imports of silence class to be more inline with the original import structure. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Adds and calls a function to force a voice channel member to sync permissions. See #1160 for why this is necessary. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Notifies invocation channel that the silence command failed to silence the channel because it could not move members, but roles were updated. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
…a/bot into voicechannel-mute
Adds an optional parameter to the silence command to enable moderators to choose if they only update permissions, or kick members too. As an accompanying feature, the unsilence command now syncs voice channel permissions too. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Fixes the channel reported as muted to voice channel chat channels when silencing voice channels. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Adds tests for helper functions in the silence cog. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
|
Note on 985b681 which implements an optional kick parameter: Ideally, the kick parameter would be the last parameter, as it is optional even if other arguments such as channel are passed, but because |
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Changes logging statement levels and messages to correctly express intent. Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Restructures silence cog helper methods to group relation functions in a more logical manner. Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
|
I'm not sure how good an idea this is when we're this far along the development process, but I'm thinking of changing up the interface for the silence command. When testing recently, I found it very clunky, especially compared to the other moderation tools. Most commands (ban, mute, etc) have the format: This was originally done because the current usage of silence is either Another idea I had was making the second argument accept both duration and target. This should be doable by having the argument type as |
Uses `.format` to create silence and unsilence messages instead of `.replace`. Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
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 <hassan@hassanamr.com>
|
I put it up to a vote with the mods, and most people were leaning towards making the first argument accept either the duration or the channel, so I did that. From my testing, the converters are able to properly choose between a channel, and an int, so not much work was needed. The subject of the |
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 <hassan@hassanamr.com>
|
It took some figuring out, but now both changes have been made, and the PR is ready for review again. |
kosayoda
left a comment
There was a problem hiding this comment.
Almost everything I've tried works to my expectation (almost merged it :x), but |silence forever only silences the channel for the fallback 10 minutes. I suspect this has something to do with dpy's parser, would you mind looking into it?
Fixes a bug that stopped the duration `forever` from getting used as a valid duration for silence. Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Xithrius
left a comment
There was a problem hiding this comment.
Tested it with author of this PR, it works very well!
Description
Adds voice channel muting functionality, similar to text channel muting.
Closes #1160, closes #1282.
ToDo
Tests
Other