Cog-Creators / Red-DiscordBot

A multi-function Discord bot
https://docs.discord.red
GNU General Public License v3.0
4.63k stars 2.28k forks source link

[Audio] `disconnect` command should check if the user is actually in the VC #6365

Open cool-aid-man opened 2 months ago

cool-aid-man commented 2 months ago

What Red version are you using?

3.5.9

Cog name

Audio

Command name

disconnect

What did you expect to happen?

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?

  1. Connect to a VC
  2. Set the vote percentage to 0 by audioset vote 0
  3. Summon the bot to join
  4. Ask any user or <p>mock anyone to run <p>disconnect Result - It should let that user x disconnect the bot without having to be there in the VC.

    The summon command ONLY works if you are in the VC - likewise, the disconnect should also work if the user is in the VC, regardless of the status of the audioset vote.

Same result with or without the human. (Meaning if the bot is alone or with other users doesn't matter)

Anything else?

N/A

aikaterna commented 2 months ago

Sounds like the person that ran disconnect is a priviledged user like a server owner or a mod or admin set through Red.

aikaterna commented 2 months ago

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.

cool-aid-man commented 2 months ago

Sounds like the person that ran disconnect is a priviledged user like a server owner or a mod or admin set through Red.

Hi aika, I can confirm that this is not the case here,

ProfessorFartsalot commented 1 month ago

I also have this issue. I can summon my Red instance to a voice channel, and my alt account (with only the @\everyone role) can disconnect the instance despite the user not being in the voice channel.

Edit: clarification, accidental ping, the sky is now on fire...

ProfessorFartsalot commented 1 month ago

image

image

BenCos17 commented 1 month ago

can confirm that it's the same for me also