[Audio] disconnect command should check if the user is actually in the VC #6365
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#6365
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?
What Red version are you using?
3.5.9
Cog name
Audio
Command name
disconnect
What did you expect to happen?
summoncommand - thedisconnectcmd should also check if the user (who is invoking the command) actually is in the VC before letting them disconnect the bot from the VC - where it's already playing songs along with other humans.What actually happened?
It lets anyone who is not in the VC, run the command resulting in the bot getting disconnected from the VC, leading to an unpleasant experience.
How can we reproduce this error?
audioset vote 0<p>mockanyone to run<p>disconnectResult - It should let that user x disconnect the bot without having to be there in the VC.
Same result with or without the human. (Meaning if the bot is alone or with other users doesn't matter)
Anything else?
N/A
Sounds like the person that ran disconnect is a priviledged user like a server owner or a mod or admin set through Red.
Also another thing to note is that the permissions system for audio will not adhere to restrictions if there is no one in the channel or if they are alone.
Hi aika, I can confirm that this is not the case here,
setcommand - In fact the user doesn't have any perms besides send_message.permissionscog, I had cleared all the permissions just to be extra safe.DJrole set through theaudioset dj.audioset vote 0(If the audioset vote is set to any percentage then it would have asked the user - "There are other people listening - vote to skip instead.")I also have this issue. I can
summonmy Red instance to a voice channel, and my alt account (with only the @\everyone role) candisconnectthe instance despite the user not being in the voice channel.Edit: clarification, accidental ping, the sky is now on fire...
can confirm that it's the same for me also
I'm not sure checking that the user is in the VC is the right thing to do here - I think it would make more sense to check whether the user can join (and maybe speak in? I'm not sure that would be consistent with the rest of the Audio commands though) the channel. If they can, they can easily just join the channel and run
[p]disconnectanyway, so it just forces them to do an extra step for no reason.I guess whatever the rules for
[p]stopare, should apply to[p]disconnect.