Make PyNaCl optional

This commit is contained in:
Hornwitser
2016-06-28 00:57:52 -04:00
committed by Rapptz
parent 197e52994e
commit e1f8bdc440
3 changed files with 15 additions and 2 deletions

View File

@ -154,6 +154,10 @@ class Client:
self._is_logged_in = asyncio.Event(loop=self.loop)
self._is_ready = asyncio.Event(loop=self.loop)
if VoiceClient.warn_nacl:
VoiceClient.warn_nacl = False
log.warning("PyNaCl is not installed, voice will NOT be supported")
# internals
@asyncio.coroutine