Articles on: Discord Bot Guides

How to install Opus for your Python bot


Opus is a popular audio encoder used for Discord bots. Here are instructions on how to download opus and make it work with discord.py

Run those commands one-by-one (by switching to the InDev mode):
wget --quiet https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
tar -xf opus-1.3.1.tar.gz
cd opus-1.3.1
./configure --prefix="/home/container"
make install

Those will download and compile opus to the /home/container/lib directory.
Put the following piece of code in your bot source code
if not discord.opus.is_loaded():
    discord.opus.load_opus('/home/container/lib/libopus.so')


You should be good to go now, if you have any questions feel free to open a support ticket.

Updated on: 31/12/2020

Was this article helpful?

Share your feedback

Cancel

Thank you!