Compare commits

...

2 Commits

Author SHA1 Message Date
90d6132705 Attempt to load Opus 2021-08-04 16:30:01 +01:00
a10ed8ef29 Let's try if this fixes it 2021-08-04 16:25:48 +01:00

View File

@ -68,12 +68,14 @@ 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.PCMAudio(open("./assets/tcard.wav", "rb"))
tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb"))
v.play(tcardaudio)
while v.is_playing():
time.sleep(1)
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."""