Let's try if this fixes it

This commit is contained in:
Vivek Santayana 2021-08-04 16:25:48 +01:00
parent 330426b2d3
commit a10ed8ef29

View File

@ -70,10 +70,9 @@ class TCardCommand(commands.Cog, name='T-Card Command'):
"""Do the audio thing.""" """Do the audio thing."""
for vc in ctx.channel.category.voice_channels: for vc in ctx.channel.category.voice_channels:
v = await vc.connect() v = await vc.connect()
tcardaudio = discord.PCMAudio(open("./assets/tcard.wav", "rb")) tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb"))
v.play(tcardaudio) v.play(tcardaudio)
while v.is_playing(): while v.is_playing(): time.sleep(.1)
time.sleep(1)
await v.disconnect() await v.disconnect()
else: else:
"""Send a T-Card to the immediate channel if this is a generic channel.""" """Send a T-Card to the immediate channel if this is a generic channel."""