diff --git a/cogs/players.py b/cogs/players.py index b317801..d3dea29 100644 --- a/cogs/players.py +++ b/cogs/players.py @@ -1724,11 +1724,9 @@ class Players(commands.Cog): this_q = Question(self.bot, ctx.channel, prompt, qtype='yesno', timeout=15) 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.') return - elif not resp: - channel_name = f'{this_team["abbrev"]} vs {other_team["abbrev"]}' logging.info(f'getting roles') this_team_role = discord.utils.get(ctx.guild.roles, name=f'{this_team["lname"]}') @@ -1754,7 +1752,10 @@ class Players(commands.Cog): while True: await asyncio.sleep(900) 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 @commands.command(name='headshot', aliases=['hs'], help='Set headshot pic') diff --git a/cogs/transactions.py b/cogs/transactions.py index 35dd8c3..ac36ef2 100644 --- a/cogs/transactions.py +++ b/cogs/transactions.py @@ -1907,7 +1907,7 @@ class Transactions(commands.Cog): for x in frozen_moves: if x["moveid"] not in frozen.keys(): - frozen[frozen_moves[x]["moveid"]] = [] + frozen[x["moveid"]] = [] frozen[x["moveid"]].append( 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) 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.has_any_role(SBA_PLAYERS_ROLE_NAME)