LennyPhoenix / py-discord-sdk

Discord Game SDK for Python
MIT License
26 stars 7 forks source link

is_self_mute not working #12

Closed Criveratech closed 2 years ago

Criveratech commented 2 years ago

Maybe I'm just stupid but I cant get it to work. I can only manage to get a static Value out of it. Also seems to change to True once I set an Activity.

app = dsdk.Discord(<appid>, dsdk.CreateFlags.default)

voice_manager = app.get_voice_manager()

def on_curr_user_update():
    print(app.get_voice_manager().is_self_mute())

voice_manager.on_settings_update = on_curr_user_update
# Don't forget to call run_callbacks
while 1:
    time.sleep(1/10)
    app.run_callbacks()

is my code right now

LennyPhoenix commented 2 years ago

The voice manager only interacts with voice lobbies created from the SDK, it does not have access to the voice channel the user is connected to via the Discord client. If you want to access information about the Discord client, you will likely have to use the IPC protocol directly.

Join the Discord developers server and jump to this message for a bit more information on this.

Criveratech commented 2 years ago

Alright, so i WAS using it wrong then, my bad. Thanks for the fast reply tho :)

LennyPhoenix commented 2 years ago

No worries :+1: