Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unmuting suppressed users #1783

Merged
merged 3 commits into from
Sep 5, 2021

Conversation

DeveloperTK
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #1781

Description

Discord handles unmuting suppressed users with no talk permissions by sending an API call that would otherwise unmute the member guild-wide. This check inside of the mute action prevents this:

if (voiceState.isGuildMuted() == mute)
    return new CompletedRestAction<>(getJDA(), null);

For my thought process debugging this, see: #1781

@DV8FromTheWorld
Copy link
Member

While this definitely would "fix" the issue, I'm wondering if this is actually a discord bug that allows this functionality and was introduced with the introduction of StageChannels.

When you join a StageChannel you are auto-suppressed, however to become a speaker you get unsuppressed/unmuted.

I wonder if this functionality has somehow bled over into VoiceChannels on accident. I'd like to see this functionality being shown to be intended before we solidify it in JDA.

@DeveloperTK
Copy link
Contributor Author

DeveloperTK commented Aug 30, 2021

Good point but I have experienced this behaviour long before StageChannels. When joining a channel with no talking permission (such as the AFK channel), you are suppressed but not muted. Unmuting the user also unsupresses them all while the mute field of the member object is still false. A few weeks ago I have read something on the discord-developers guild regarding that for now this behaviour is intended but I cannot seem to find it anymore.

However this was always the way of unmuting people when they are suppressed. Since the client doesn't show the user being suppressed in the context menu, muting and then unmuting them was the way to go for the last 5 years or so (using the client). With the API we can just "force un-mute" them which also changes the suppression state and not only guild mutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants