Бот-код:
import discord
import youtube_dl
from discord.ext import commands
client = commands.Bot(command_prefix = "e!")
players = {}
@client.event
async def on_ready():
print("Bot çevrimiçi!")
@client.command(pass_context = True)
async def baglan(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
@client.command(pass_context = True)
async def oynat(ctx, url):
server = ctx.message.server
voice_client = client.voice_client_in(server)
player = await voice_client.create_ytdl_player(url)
players[server.id] = player
player.start()
client.run('')
Ошибка:
packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'create_ytdl_player'
Бот обычно работает на моем собственном ПК, но в настоящее время я работаю на Heroku
сервере. Бот присоединяется к каналу, но не воспроизводит аудио.
Я не мог придумать, как решить эту проблему
Заранее благодарю за помощь.