🎹 Discord Music Bots Native Support 🥁
At Repl.it we believe programming should useful, fun, and exciting. Discord bots have been something people loved to make with Repl.it ever since we enabled outbound network connections from repls (yes, we used to disable networking).
Discord music bots, however, didn't work very well if at all. At first, OPUS was missing from our Python environment. Then we also inadvertently blocked voice connections from our servers. So all in all it was a pain. However, today, I'm excited to announce that Music Bots natively work on Repl.it.
The only thing that's currently missing from our images is native ffmpeg support, but that can be worked around by installing ffmpeg-static from npm. I just added the following Python repl to templates to make it easy for you to get started.
I know it works in Node.js too but I didn't have the time to make a nice template. If anyone can make a very simple template for Node.js I'd love to include it in our template library.
why i getting this error
"An error occurred: Command raised an exception: DownloadError: [0;31mERROR:[0m Xx9V0fTDJY0: YouTube said: Unable to extract video data"
my bot gives me a error saying 'An error occurred: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice' isnt pynaci downloaded already?
for people who dont know the prefix, it's "music." you can change this by going to: bot = commands.Bot('music.', description='Yet another music bot.')
and changing 'music.' to whatever prefix you want it to be
With native OPUS, networking, and native always up Repls... Repl might just be suitable for hosting a powerful bot.
@firefish I don't know, we run some production work on Repl.it on a single container and it serves lots of users. We also have a lot of big bots already hosted on repl.it.
I would try it. If your code is efficient it should work especially with the hacker plan.
In the future, we'll probably have to introduce an even bigger plan.
@amasad @firefish The biggest problem with most bots hosted here is the actual code and language, usually, they're written in inefficient languages (ex: Python, JS), but what's worse is they're often set up in very inefficient ways.
If you set it up correctly, plan ahead, and know what you're doing, it can perform very well, but this applies even outside of Repl.it.
My bot gives me an error saying: An error occurred: Command raised an exception: DownloadError: [0;31mERROR:[0m query "Godzilla": Failed to parse JSON (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)'))
Tried to create a discord bot to play music (https://repl.it/@PDanielY/EasygoingPlumHashmaps#index.js).
File "main.py", line 240, in play_next_song
VoiceError: 'NoneType' object has no attribute 'read'
can someone explain me why? and how to fix it? i can't loop the muscis
Why is my bot giving me this error in the Discord Chat ("An error occurred: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice") and in the Console, it says ("export PATH="$PWD/node_modules/ffmpeg-static:$PATH" python main.py")?? can anyone please help?