Fix voice in container
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
FROM python:3
|
FROM python:3.9.1-alpine
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
RUN apk add ffmpeg musl-dev linux-headers gcc libffi-dev make opus
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
COPY . .
|
COPY . .
|
||||||
CMD ["bot.py"]
|
CMD ["bot.py"]
|
||||||
|
|||||||
3
bot.py
3
bot.py
@@ -47,6 +47,9 @@ last_loeh = 0
|
|||||||
config_load()
|
config_load()
|
||||||
bot = commands.Bot(command_prefix=config.get('prefix'))
|
bot = commands.Bot(command_prefix=config.get('prefix'))
|
||||||
|
|
||||||
|
if 'LIBOPUS' in os.environ and not len(os.environ['LIBOPUS']) == 0:
|
||||||
|
discord.opus.load_opus(os.environ['LIBOPUS'])
|
||||||
|
|
||||||
|
|
||||||
async def get_loeh(guild: discord.Guild) -> Optional[discord.Member]:
|
async def get_loeh(guild: discord.Guild) -> Optional[discord.Member]:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -4,3 +4,5 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
|
environment:
|
||||||
|
LIBOPUS: "/usr/lib/libopus.so.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user