fix(voice): show clear error when voice dependencies are missing
When PyNaCl or davey is not installed, joining a voice channel fails with a raw exception. Now shows a human-readable message pointing the user to reinstall with voice support. Closes #1336
This commit is contained in:
parent
773f3c1137
commit
1cacaccca6
1 changed files with 3 additions and 0 deletions
|
|
@ -2435,6 +2435,9 @@ class GatewayRunner:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("Failed to join voice channel: %s", e)
|
logger.warning("Failed to join voice channel: %s", e)
|
||||||
adapter._voice_input_callback = None
|
adapter._voice_input_callback = None
|
||||||
|
err_lower = str(e).lower()
|
||||||
|
if "pynacl" in err_lower or "nacl" in err_lower or "davey" in err_lower:
|
||||||
|
return "Voice dependencies are missing (PyNaCl / davey). Please reinstall Hermes with voice support enabled."
|
||||||
return f"Failed to join voice channel: {e}"
|
return f"Failed to join voice channel: {e}"
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue