title: Data not saving for discord.py bot on github
body: <p>I made a discord bot and hosted it on Heroku using Github. A part of the bot is a leveling system that saves the information to a folder called users.json. Since I have switched over from local hosting to hosting it on Heroku it is not saving. My code is bellow:</p>
  <pre class="lang-py prettyprint-override"><code>@client.event
  async def on_member_join(member):
      with open('users.json', 'r') as f:
          users = json.load(f)
  
      await update_data(users, member)
  
      with open('users.json', 'w') as f:
          json.dump(users, f)
  
  
  @client.event
  async def on_message(message):
      if message.author.bot == False:
          with open('users.json', 'r') as f:
              users = json.load(f)
  
          await update_data(users, message.author)
          await add_experience(users, message.author, 5)
          await level_up(users, message.author, message)
  
          with open('users.json', 'w') as f:
              json.dump(users, f)
  
      await client.process_commands(message)
  
  
  async def update_data(users, user):
      if not f'{user.id}' in users:
          users[f'{user.id}'] = {}
          users[f'{user.id}']['experience'] = 0
          users[f'{user.id}']['level'] = 1
  
  
  async def add_experience(users, user, exp):
      users[f'{user.id}']['experience'] += exp
  
  
  async def level_up(users, user, message):
      with open('levels.json', 'r') as g:
          levels = json.load(g)
      experience = users[f'{user.id}']['experience']
      lvl_start = users[f'{user.id}']['level']
      lvl_end = int(experience ** (1 / 4))
      if lvl_start &lt; lvl_end:
          await message.channel.send(f'{user.mention} has leveled up to level {lvl_end}')
          users[f'{user.id}']['level'] = lvl_end
  
  @client.command()
  async def level(ctx, member: discord.Member = None):
      if not member:
          id = ctx.message.author.id
          with open('users.json', 'r') as f:
              users = json.load(f)
          lvl = users[str(id)]['level']
          await ctx.send(f'You are at level {lvl}!')
      else:
          id = member.id
          with open('users.json', 'r') as f:
              users = json.load(f)
          lvl = users[str(id)]['level']
          await ctx.send(f'{member} is at level {lvl}!')
  </code></pre>