'replit discord await channel.connect() error
This is my discord bot source on replit
import discord
import discord.ext
from time import sleep
import os
client = discord.Client()
@client.event
async def on_ready():
channel = client.get_channel(967002578607042581)
await channel.connect()
print('Done')
client.run(os.getenv('TOKEN'))
sleep(1000)
**Replit error **
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/GracefulWetProfile/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 11, in on_ready
await channel.connect()
File "/home/runner/GracefulWetProfile/venv/lib/python3.8/site-packages/discord/abc.py", line 1277, in connect
voice = cls(client, self)
File "/home/runner/GracefulWetProfile/venv/lib/python3.8/site-packages/discord/voice_client.py", line 199, in __init__
raise RuntimeError("PyNaCl library needed in order to use voice")
RuntimeError: PyNaCl library needed in order to use voice
i think replit cant support {await} command
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|