[V3 Mod] Make mute server use a role #1852
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#1852
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature request
Select the type of feature you are requesting:
Describe your requested feature
The
[p]mute serveredit every channel permissions. This requires a lot of API calls and is really slow to operate (it takes about 6 seconds for 10 channels, so imagine on huge servers) and we could reduce that time by muting using a role instead of editing the channel permissions.This should be optional so users can decide what they want between a fast server mute with a role or a slow mute with channel perms.
This is a well presented suggestion, it has a few issues though. I agree that the current
[p]mute servercommand is too API spammy. However applying a role instead is a change in behaviour, so this could be a separate command (cough punish cough). One use of[p]mute serveris to quickly restrict a user to a small number of channels by doing[p]mute serverfollowed by[p]unmute channel, because doing[p]mute channelin every other channel would take a long time. Applying a muted role to a person changes the behaviour in that[p]unmute channelwouldn't do anything to someone who is server-muted.An alternate approach might be to allow roles to be muted the same way users can, then mods can just apply a muted role. This avoids changing the behaviour of
[p]mutebut doesn't solve the API spammy nature of the command itself. I'm open to more discussion :)Maybe we could still use a role for guild mute and, when using channel unmute, force the
send_messagespermissions in the channel (ignore role perms)? But another issue would be to remove that forced permission, but when...I already started working on that feature, you can check the
mutebranch of my fork (the work currently done ignores what you suggested, but I will look after it).Another addition not specified in the issue is that, when using
mutewithout subcommands, it will be default to a guild mute (my moderators were lost because they were just trying to[p]mute @someone)I had an idea for solving this problem in v2 punish that I'll try to implement and test today. Will comment with how it goes.
This cannot be reliably done with a role without a server's permissions being designed for this usage.
If this makes it into core, it needs to error in cases it would be ineffective with a clear reason why presented to the user.
Discord's developer docs on permissions explain this, but not really in good user-facing terms. If a user has any role allowing something (other than the default role), any role-based denies won't matter since non-default role allows are batch applied after batch applying non-default role denies.
This ends up making it so that channels which are invisible to most, visible but mute to role B and non-mute to role C can't be effectively muted without also revoking read permissions without assigning permissions granularly, and ensuring members of C are also members of B.
It gets significantly more convoluted with more restricted channels.
I'm of the opinion it's worth supporting, but given the various caveats for it, it needs to be opt-in, with well-documented reasons as to why, and how to properly configure it, and warn users if it isn't going to work on someone they attempt to mute with it.
replaced by #3270