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

VoiceState.channel_id None when it shouldn't be #513

Closed
sasjafor opened this issue Mar 16, 2019 · 5 comments
Closed

VoiceState.channel_id None when it shouldn't be #513

sasjafor opened this issue Mar 16, 2019 · 5 comments
Labels
opinions wanted Discussion or solution to a problem requested. possible bug Proclaimed misbehaviour that has not been confirmed by developers yet. voice Related to the `voice` module and `serenity_voice_model` crate.

Comments

@sasjafor
Copy link

sasjafor commented Mar 16, 2019

I have written a simple bot which reacts to voice state updates.

Now when I switch from a normal voice channel to a voice channel with "Connect" permission restricted on discord, the field VoiceState.channel_id is None. But when I already am in that channel, the channel_id is Some and the bot can join the channel.
The bot has the necessary "Connect" permission, and it can join when I have a channel_id to pass.

Serenity version: rev = "722e1cc" on branch v0.6.x (because of issue with openssl 1.1.1)

Rust version (rustc -V): rustc 1.33.0 (2aa4c46cf 2019-02-28)

Minimal test case if possible:

  • Discord Server with two voice channels
    • One normal
    • One with "connect" permission restrict for @everyone
  • Give "connect" permission to bot
  • Join normal channel
  • Switch to restricted channel
  • Check voice_state.channel_id from fn voice_state_update

EDIT: On a different server with the exact same settings, it seems to work without problems. However, I have written a very similar bot in JS using discord-js and that one can retrieve the channel id and join when doing the exact same test (where the bot using serenity fails), with the same settings on discord.

@Lakelezz Lakelezz added possible bug Proclaimed misbehaviour that has not been confirmed by developers yet. voice Related to the `voice` module and `serenity_voice_model` crate. labels Mar 16, 2019
@sasjafor
Copy link
Author

I can confirm that it doesn't happen on version = "0.5.13". Luckily the docker rust:1.33 image can build serenity without openssl issues.

@Erk-
Copy link
Member

Erk- commented Mar 17, 2019

Until it is fixed you can also use this trick to fix the issue #394 (comment)

(Just to let you know if you run the binary build in docker on a machine with another openssl version it may segfault)

@Lakelezz Lakelezz mentioned this issue Mar 29, 2019
18 tasks
@Lakelezz
Copy link
Contributor

Lakelezz commented May 3, 2019

I tried and could not reproduce this (on 5fa5dbf), neither on the new nor old VoiceState. While the old being the one grabbed from the cache prior updating it.

@Lakelezz Lakelezz added the opinions wanted Discussion or solution to a problem requested. label May 6, 2019
@Lakelezz
Copy link
Contributor

Lakelezz commented May 6, 2019

I added help_wanted as I would like other people to try to reproduce this because I could not.

@ghost
Copy link

ghost commented Jun 9, 2019

Can't reproduce using 7c61f95, closing for now. If you can reproduce it with debugging information and a sample program please let us know and it can be re-opened.

@ghost ghost closed this as completed Jun 9, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opinions wanted Discussion or solution to a problem requested. possible bug Proclaimed misbehaviour that has not been confirmed by developers yet. voice Related to the `voice` module and `serenity_voice_model` crate.
Projects
None yet
Development

No branches or pull requests

3 participants