From 90d6132705b8ca025fbf9799f46dbf3ff9df85b6 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Wed, 4 Aug 2021 16:30:01 +0100 Subject: [PATCH] Attempt to load Opus --- app/cogs/slashcommands/secondary/tcard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/cogs/slashcommands/secondary/tcard.py b/app/cogs/slashcommands/secondary/tcard.py index bb79248..c3077a8 100644 --- a/app/cogs/slashcommands/secondary/tcard.py +++ b/app/cogs/slashcommands/secondary/tcard.py @@ -68,6 +68,9 @@ 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') for vc in ctx.channel.category.voice_channels: v = await vc.connect() tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb"))