@commands.command()
async def addtag(self, ctx, platform, tag):
    with open(gamertags, 'r') as in_file:
        data = json.load(in_file)
    author_id = str(ctx.message.author.id)
    data[author_id][platform.lower()] = tag
    with open(gamertags, 'w') as out_file:
        json.dump(data, out_file)
@commands.command()
async def addtag(self, ctx, platform, tag):
    with open(gamertags, 'r') as in_file:
        data = json.load(in_file)
    author_id = str(ctx.message.author.id)
    data[author_id][platform.lower()] = tag
    with open(gamertags, 'w') as out_file:
        json.dump(data, out_file)