[Mod] [p]mute|unmute voice now take action instantly #4064
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!4064
Loading…
Reference in a new issue
No description provided.
Delete branch "voicemute-move"
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?
Type
Description of the changes
When
[p]mute|unmute voiceis run, now the changes will take into effect instantly, instead of when the user rejoins. This is done via the move members permission, moving the user into the channel they are already in. Fixes #4028. However, as jack said in #4028:Looks mostly good, just small string changes needed and preemptive checks.
There's one thing that could be done differently, although I don't think it's really a better way (just thought, it's worth mentioning) - the call to
_voice_perm_check()in line 179 and 302 could havemove_members=Trueargument passed and the command would just early-fail in such case. But since the moving isn't entirely necessary, it probably doesn't make that much sense to do in this way.@ -207,6 +207,17 @@ class MuteMixin(MixinMeta):await ctx.send(Permission name should be title-cased same as it is presented in Discord's UI.
This should be in an
ifchecking whether the bot has that permission so that we don't make API request if we already know that it's gonna fail.Permission name should be title-cased same as it is presented in Discord's UI.
This should be in an
ifchecking whether the bot has that permission so that we don't make API request if we already know that it's gonna fail.👍 As you mentioned
_voice_perm_check()isn't especially better here as it sends a message in the text channel that could be misleading/otherwise require "unnecessary" perms.I couldn't get permissions_for to work when I was doing it...
Looks good to me. Thanks for the fix!