import discord
import pynacl
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$'):
if message.author.voice:
await message.author.voice.channel.connect()
return await message.channel.send(message.author.voice.channel)
After starting the program, an error appears ModuleNotFoundError: No module named 'pynacl'. It is important to note that pynacl is already in the module list.
When I reinstall the module pip install PyNaCl/pip3 install PyNaCl, the console says the module is already loaded.
Tried:
Reload IDLE and computer, tried import nacl (ModuleNotFoundError: No module named 'nacl'), and not import pynacl, reinstall module, and also used import discrod.py[voice]. If the module is not imported, it displays the following error: RuntimeError: PyNaCl library needed in order to use voice.
I am using IDLE Python 3.7.1