From 175a911ed40496cbf5429ca877845a02892c36db Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Thu, 5 Aug 2021 00:40:58 +0100 Subject: [PATCH] Try enabling opus --- app/cogs/slashcommands/secondary/tcard.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/cogs/slashcommands/secondary/tcard.py b/app/cogs/slashcommands/secondary/tcard.py index 750755d..4a2e66a 100644 --- a/app/cogs/slashcommands/secondary/tcard.py +++ b/app/cogs/slashcommands/secondary/tcard.py @@ -68,16 +68,16 @@ 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.""" - # opus = discord.opus.load_opus('/usr/lib/x86_64-linux-gnu/pwd libopus.so.0') + opus = discord.opus.load_opus('/usr/lib/x86_64-linux-gnu/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")) - # v.play(tcardaudio) - # while v.is_playing(): time.sleep(.1) - # await v.disconnect() + for vc in ctx.channel.category.voice_channels: + v = await vc.connect() + tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb")) + v.play(tcardaudio) + while v.is_playing(): time.sleep(.1) + await v.disconnect() else: """Send a T-Card to the immediate channel if this is a generic channel.""" await ctx.channel.send(embed=embed)