Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krofna committed Aug 5, 2019
1 parent 6554373 commit 112a460
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tle/cogs/handles.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,9 @@ async def identify(self, ctx, handle: str):
return

invoker = str(ctx.author)
if invoker not in self.identify_map:
problem = random.choice(cf_common.cache2.problem_cache.problems)
handle, name, url = (users[0].handle, problem.name, problem.url)
self.identify_map[invoker] = (handle, name, url)
else:
handle, name, url = self.identify_map[invoker]

problem = random.choice(cf_common.cache2.problem_cache.problems)
handle, name, url = (users[0].handle, problem.name, problem.url)
self.identify_map[invoker] = (handle, name, url)
await ctx.send(f'`{invoker}`, submit a compile error to <{url}> and then run `;handle report`')

@handle.command(brief='Report identification')
Expand All @@ -198,7 +194,6 @@ async def report(self, ctx):
self.identify_map.pop(invoker)
users = await cf.user.info(handles=[handle])
await self._set(ctx, ctx.author, users[0])
await ctx.send(f'`{invoker}` set to `{handle}`')
else:
await ctx.send(f'Sorry `{invoker}`, can you try again?')

Expand Down

0 comments on commit 112a460

Please sign in to comment.