from discord.ext import commands
import discord
class join(commands.Cog): def init(self, bot): self.bot = bot print('Модуль {} загружен'.format(self.class.name))
@commands.command(name='join')
async def join(self, ctx):
channel = ctx.message.author.voice.channel
voice = discord.utils.get(ctx.guild.voice_channels, name=channel.name)
voice_client = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
if voice_client == None:
await voice.connect()
else:
await voice_client.move_to(channel)
def setup(bot): bot.add_cog(join(bot))
Ошибка: Traceback (most recent call last): File "C:\bot_my\venv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke await ctx.command.invoke(ctx) File "C:\bot_my\venv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke await injected(*ctx.args, **ctx.kwargs) File "C:\bot_my\venv\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice
RuntimeError: PyNaCl library needed in order to use voice
сами переведете эту ошибку?