title: storing channel ids and guild ids with json python
body: <p><strong>CODE</strong>:</p>
  <pre><code>def get_channels(client, guild):
      with open('channels.json','r') as f:
          channelss = json.load(f)
  
      return channelss[str(guild.id)]
  
  
  @client.event
  async def on_ready():
      print(&quot;testing...&quot;)
  
  
  @client.command()
  async def setreportchannel(ctx, channels: discord.TextChannel):
      with open('channels.json','r') as f:
          channel = json.load(f)
  
      channel[str(ctx.guild.id)] = int(channels.id)
  
      with open('channels.json','w') as f:
          json.dump(channel,f,indent=4)
  
      await ctx.send(f&quot;set the report channel to {channels}&quot;)
  
  @client.command()
  async def report(ctx, member:discord.Member, *, reason):
      channel = client.get_channel(get_channels)
      await ctx.channel.send(f&quot;{member} has been reported for: {reason}&quot;)
  </code></pre>
  <p><strong>JSON FILE:</strong>
  {
  &quot;850356901232771082&quot;: 850357833538338816
  }</p>
  <p><strong>Problem:</strong>
  its not sending in the right channel on what is stored in the json file, its suppose to be in the place where the user set the channel with using the command setreportchannel</p>