[V3] Unmute has odd behaviour on admins #2076
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#2076
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?
Command bugs
Command name
Unmute
What cog is this command from?
Mod
What were you expecting to happen?
Unmute someone from the server.
What actually happened?
It sent the "user has been unmuted from the server" but did not remove the permissions from the channels.
How can we reproduce this issue?
Mute someone using [p]mute server user and then [p]unmute server user and it will not remove the permissions from the channels.
What kind of info is needed?
traceback error... if there is one
edit: "but did not remove the permissions from the channels." that doesn't mean they weren't unmuted it just means the user profile on the channel wasn't removed if you check it the write perm was re-enabled (if i understood that correctly)
I've been playing around with this a little. This is in a test server with no special channel overwrites beyond an admin role that has access to a private category, text channel, and voice channel. This isn't full QA by any means but it's what I found while messing around with it.
Mute:
For every channel the bot and member have access to...
Categories and VCs are denied the Speak permission.
Text channels are denied Send Messages and Add Reactions.
(As a small note this causes categories and their text channels to no longer be in sync.)
No traceback in console.
Unmute:
I got a couple different results depending on the member's permissions.
If the member has the admin override, nothing happens. Overwrites set via Mute are as they were.
If the member has no admin override, text channel overwrites are deleted, while category and VC overwrites for that member are set to all None (including for categories / VCs that were not touched by mute beforehand).
The bot having a higher role than the member or not has no effect on the above behavior.
No traceback in console in either case.
The bot has the highest role and none of the users I am trying to mute have a role above the BOT, I'm confused why mute works but unmute does not, any info?
Literally that big ol' comment directly above yours was a huge infodump when I tested this issue out. Give it a read if you want info.
Yes I read that, from what I understand it does not work the way it is intended to?
As it stands, based on my testing,
[p]unmutedoes function, though it could use improvements. In my testing it only ever failed to unmute members who had the Administrator override in their permissions, which allows them to bypass channel permissions. So muting/unmuting doesn't affect them either way. Since currently the bot only unmutes in channels the member can't send messages to, it doesn't change permissions for Administrator members.In other words, since the muted member was an Administrator, they were never muted in the first place, so there's nothing to unmute, so the bot didn't touch channel overwrites.
I see now, I'm confused why it mutes people with administrator but then does not unmute them though
Resolved by #2230.