Bug fixes

This commit is contained in:
Cal Corum 2023-09-07 14:09:23 -05:00
parent 6eac0d50f3
commit 5b7a0e85b8
2 changed files with 6 additions and 6 deletions

View File

@ -1724,11 +1724,9 @@ class Players(commands.Cog):
this_q = Question(self.bot, ctx.channel, prompt, qtype='yesno', timeout=15) this_q = Question(self.bot, ctx.channel, prompt, qtype='yesno', timeout=15)
resp = await this_q.ask([ctx.author]) resp = await this_q.ask([ctx.author])
if resp is None: if not resp:
await ctx.send('Fine. I bet they didn\'t wanna talk to you anyway.') await ctx.send('Fine. I bet they didn\'t wanna talk to you anyway.')
return return
elif not resp:
channel_name = f'{this_team["abbrev"]} vs {other_team["abbrev"]}'
logging.info(f'getting roles') logging.info(f'getting roles')
this_team_role = discord.utils.get(ctx.guild.roles, name=f'{this_team["lname"]}') this_team_role = discord.utils.get(ctx.guild.roles, name=f'{this_team["lname"]}')
@ -1754,7 +1752,10 @@ class Players(commands.Cog):
while True: while True:
await asyncio.sleep(900) await asyncio.sleep(900)
if len(this_vc.members) == 0: if len(this_vc.members) == 0:
await this_vc.delete() try:
await this_vc.delete()
except Exception as e:
logging.error(f'could not delete {this_vc}.')
break break
@commands.command(name='headshot', aliases=['hs'], help='Set headshot pic') @commands.command(name='headshot', aliases=['hs'], help='Set headshot pic')

View File

@ -1907,7 +1907,7 @@ class Transactions(commands.Cog):
for x in frozen_moves: for x in frozen_moves:
if x["moveid"] not in frozen.keys(): if x["moveid"] not in frozen.keys():
frozen[frozen_moves[x]["moveid"]] = [] frozen[x["moveid"]] = []
frozen[x["moveid"]].append( frozen[x["moveid"]].append(
f'**{x["player"]["name"]}** ({x["player"]["wara"]}) from ' f'**{x["player"]["name"]}** ({x["player"]["wara"]}) from '
@ -1925,7 +1925,6 @@ class Transactions(commands.Cog):
embed.add_field(name=f'Trans ID: {move_id}', value=move_string) embed.add_field(name=f'Trans ID: {move_id}', value=move_string)
await ctx.author.send(content='Hey, boo. Here are your upcoming transactions:', embed=embed) await ctx.author.send(content='Hey, boo. Here are your upcoming transactions:', embed=embed)
await ctx.author.send('See everything you expected?')
@commands.command(name='legal', help='Check roster legality') @commands.command(name='legal', help='Check roster legality')
@commands.has_any_role(SBA_PLAYERS_ROLE_NAME) @commands.has_any_role(SBA_PLAYERS_ROLE_NAME)