forked from viveksantayana/geas-bot
Fully implemented /tcard command.
Bug fixes for member signup Added live update of game header message during pitches Documentation updates
This commit is contained in:
@ -148,7 +148,7 @@ class PlayerCommands(commands.Cog, name='Player Commands'):
|
||||
tc = discord.utils.find(lambda x: x.id == lookup[guildStr][rStr]['text_channel'],ctx.guild.channels)
|
||||
if tc is not None:
|
||||
p = await tc.pins()
|
||||
if p:
|
||||
if p is not None:
|
||||
header = discord.utils.find(lambda x: x.id == hm, p)
|
||||
if header is not None:
|
||||
text = header.content.split('\n')
|
||||
@ -211,7 +211,7 @@ class PlayerCommands(commands.Cog, name='Player Commands'):
|
||||
tc = discord.utils.find(lambda x: x.id == lookup[guildStr][rStr]['text_channel'],ctx.guild.channels)
|
||||
if tc is not None:
|
||||
p = await tc.pins()
|
||||
if p:
|
||||
if p is not None:
|
||||
header = discord.utils.find(lambda x: x.id == hm, p)
|
||||
if header is not None:
|
||||
text = header.content.split('\n')
|
||||
|
@ -37,7 +37,6 @@ class TCardCommand(commands.Cog, name='T-Card Command'):
|
||||
gms = yaml_load(gmFile)
|
||||
categories = yaml_load(categoriesFile)
|
||||
guildStr = str(ctx.guild.id)
|
||||
# rStr = str(game.id)
|
||||
embed = discord.Embed(
|
||||
title='T-Card',
|
||||
description='A T-Card Has Been Played',
|
||||
@ -69,12 +68,9 @@ class TCardCommand(commands.Cog, name='T-Card Command'):
|
||||
|
||||
"""Do the audio thing."""
|
||||
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"))
|
||||
tcardaudio = discord.PCMAudio(open("./assets/tcard.wav", "rb"))
|
||||
v.play(tcardaudio)
|
||||
while v.is_playing(): time.sleep(.1)
|
||||
await v.disconnect()
|
||||
|
Reference in New Issue
Block a user