@commands.command()
async def viewtag(self, ctx, mention, platform):
    with open(gamertags, 'r') as in_file:
        data = json.load(in_file)
    if (platform.lower() == 'all'):
        tags = (f"{mention}'s" + ' Gamer Tags')
        for (plat, tag) in data[str(ctx.message.mentions[0].id).lower()].items():
            tags += f'''
- {plat.capitalize()}: {tag}'''
        (await ctx.send(tags))
    else:
        (await ctx.send(f"{mention}'s {platform.capitalize()}: {data[str(ctx.message.mentions[0].id).lower()][platform.lower()]}"))
@commands.command()
async def viewtag(self, ctx, mention, platform):
    with open(gamertags, 'r') as in_file:
        data = json.load(in_file)
    if (platform.lower() == 'all'):
        tags = (f"{mention}'s" + ' Gamer Tags')
        for (plat, tag) in data[str(ctx.message.mentions[0].id).lower()].items():
            tags += f'
- {plat.capitalize()}: {tag}'
        (await ctx.send(tags))
    else:
        (await ctx.send(f"{mention}'s {platform.capitalize()}: {data[str(ctx.message.mentions[0].id).lower()][platform.lower()]}"))