Trying to install Opus lib via Docker instruction

This commit is contained in:
Vivek Santayana 2021-08-04 17:02:36 +01:00
parent 21d5cba5f5
commit 63146bd042
3 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
FROM python:3.9.6-buster
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN apt-get install libopus0
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
CMD python3 -u ./bot.py

View File

@ -68,9 +68,10 @@ class TCardCommand(commands.Cog, name='T-Card Command'):
await ctx.send(content=f'```You have invoked the T-Card in the game {lookup[guildStr][str(role.id)]["game_title"]}. The GM has been notified privately.```', hidden=True)
"""Do the audio thing."""
discord.opus.load_opus()
if not discord.opus.is_loaded():
raise RuntimeError('Opus failed to load')
opus = discord.opus.load_opus('/usr/lib/x86_64-linux-gnu/pwd libopus.so.0')
# discord.opus.load_opus()
# if not discord.opus.is_loaded():
# raise RuntimeError('Opus failed to load')
for vc in ctx.channel.category.voice_channels:
v = await vc.connect()
tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb"))

View File

@ -11,7 +11,6 @@ discord-py-slash-command==2.4.0
discord.py==1.7.3
idna==3.2
multidict==5.1.0
opuslib==3.0.1
ordered-set==4.0.2
packaging==21.0
pycparser==2.20