title: How to store JSON.(discord.py)
body: <p>So I tried storing a variable to a json file,but it gives me this error:</p>
  
  <p><em>Object of type Command is not JSON serializable</em></p>
  
  <p>The code something like this:</p>
  
  <pre><code>import discord
  from discord.ext import commands
  import json
  num = 0
  
  def store():
      with open("num.json", 'w') as file:
         json.dump(num, file)
  
  bot = commands.Bot(command_prefix='!')
  
  @bot.command()
  
  async def increase():
    num += 1
    await ctx.send("I increased your number,now it is: " + num)
    store()
  
  </code></pre>