1

I'm trying to make my discord bot reporoduce audio from a link

@client.command()
async def play(ctx, url):
   #...code

but it seems that I need to have installed a program called FFmpeg, and the problem is that i'm running my bot on replit.com,(which aparently you can't install nothing but packages) is there a way that I can play youtube audio links wihout installing any app, or there is any solution that someone can tell me?

ElmerKao
  • 115
  • 2
  • 10
  • https://replit.com/talk/ask/Installing-FFmpeg/28721 – Dominik Mar 01 '22 at 23:30
  • This it what is says `Traceback (most recent call last): File "main.py", line 7, in from FFmpeg import video ModuleNotFoundError: No module named 'FFmpeg'` – ElmerKao Mar 01 '22 at 23:42
  • use normal server instead of `replit.it` - but check if it can read from YouTube because some servers may block access to external portla - to stop spammers/hackers/etc. – furas Mar 02 '22 at 00:34
  • @furas I’ll check if it can read from YouTube. The problems is that I use replit to make it run all day, because I can’t pay for a server to stay 24x7 to just run a small proyect made for learing, that’s why I was asking – ElmerKao Mar 02 '22 at 11:36

1 Answers1

1

It seems that in replit.com they solved the problem with not being able to install any program to solve this, they have created a template called Discordpy-Music-Boy

Here is the link: https://replit.com/@replit/Discordpy-Music-Bot#main.py

They removed the capacity to install FFmpeg because it was initially used for botting and spamming, so they removed the functionality, as this post explains:

https://replit.com/talk/ask/Installing-FFmpeg/28721

And theres is no need to install nothing since it solves the problem with the FFmpeg using another package called youtube_dl that resolve most of the problem, but it's not perfect as some commands don't work, but it works fine for a small project.

ElmerKao
  • 115
  • 2
  • 10
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31662726) – Emi OB May 04 '22 at 11:58