Compare commits
No commits in common. "90d6132705b8ca025fbf9799f46dbf3ff9df85b6" and "330426b2d3848947fbdd48b3fcaff9d4828b1e10" have entirely different histories.
90d6132705
...
330426b2d3
@ -68,14 +68,12 @@ 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)
|
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."""
|
"""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:
|
for vc in ctx.channel.category.voice_channels:
|
||||||
v = await vc.connect()
|
v = await vc.connect()
|
||||||
tcardaudio = discord.FFmpegPCMAudio(open("./assets/tcard.wav", "rb"))
|
tcardaudio = discord.PCMAudio(open("./assets/tcard.wav", "rb"))
|
||||||
v.play(tcardaudio)
|
v.play(tcardaudio)
|
||||||
while v.is_playing(): time.sleep(.1)
|
while v.is_playing():
|
||||||
|
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."""
|
||||||
|
Loading…
Reference in New Issue
Block a user