title: How would I get access to a file I don't know the name of
body: <p>I might describe this very poorly but here we go. What I am doing is creating a file with the user id from discord. In a different function, I want to access the file but I don't know the name of it</p>
  <pre><code>import json
  import discord
  
  @client.command()
  async def function1(ctx):
   test1 = 3
   author = ctx.message.author.mention
   await ctx.send(author)
  
   with open(author+'.txt', 'w+') as outfile:
     json.dump(test1, outfile)
  
  @client.command()
  async def function2(ctx):
   with open(author+'.txt') as infile: #The &quot;author+'.txt'&quot; does not work because it does not know what author is.
     test2 = json.load(infile)
   await ctx.send(test2)
  </code></pre>
  <p>How would I get around this and access this file? I have an idea, I could save the author and then call it in function two. This would not work because there are many people using the bot. Am I on the right track? Thanks for the help in advance.</p>