From 63146bd04249d844df025d844da18e6a9426982b Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Wed, 4 Aug 2021 17:02:36 +0100 Subject: [PATCH] Trying to install Opus lib via Docker instruction --- app/Dockerfile | 1 + app/cogs/slashcommands/secondary/tcard.py | 7 ++++--- app/requirements.txt | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index ffdd556..1bc0e2c 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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 \ No newline at end of file diff --git a/app/cogs/slashcommands/secondary/tcard.py b/app/cogs/slashcommands/secondary/tcard.py index c3077a8..e54e042 100644 --- a/app/cogs/slashcommands/secondary/tcard.py +++ b/app/cogs/slashcommands/secondary/tcard.py @@ -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")) diff --git a/app/requirements.txt b/app/requirements.txt index d8605ab..678e117 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -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