requests.exceptions.MissingSchema: Invalid URL
youdl_opts = {'format': 'bestaudio/best'}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
@client.command()
@commands.has_permissions(administrator = True)
async def connect(ctx, self, get):
if(ctx.author.voice):
voice = await ctx.author.voice.channel.connect()
await ctx.send("Подключён")
with youtube_dl.YoutubeDL(youdl_opts) as youdl:
info = youdl.extract_info(vidoe_link, download = False)
URL = info['formats'][0]['url']
voice = get(self.bot.voice_clients, guild=ctx.guild)
voice.play(discord.FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
else:
await ctx.send("Что-то пошло не так!")