0
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

1
  • RuntimeError: PyNaCl library needed in order to use voice сами переведете эту ошибку? 17 мар в 20:51

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.