@commands.command()
async def userinfo(self, ctx, member: discord.Member=None):
    if (member == None):
        member = ctx.author
    pos = sum(((m.joined_at < member.joined_at) for m in ctx.guild.members if (m.joined_at is not None)))
    roles = [role for role in member.roles]
    embed = discord.Embed(title='👨 Info', color=discord.Color.random(), description=f'Information about: {member.name}')
    embed.add_field(name='Nickname', value=(member.nick or None))
    embed.add_field(name='Verification Pending', value=member.pending)
    embed.add_field(name='Status:', value=member.raw_status)
    if member.mobile_status:
        device = 'Mobile'
    elif member.desktop_status:
        device = 'Desktop'
    elif member.web_status:
        device = 'Web'
    embed.add_field(name='Discord Device:', value=device)
    embed.add_field(name='Color', value=member.color)
    embed.add_field(name='Mention:', value=member.mention)
    embed.add_field(name='Top Role:', value=member.top_role.mention)
    embed.add_field(name='Voice State:', value=(member.voice or None))
    embed.set_footer(icon_url=member.avatar_url, text=f'Requested By: {ctx.author.name}')
    (await ctx.send(embed=embed))
@commands.command()
async def userinfo(self, ctx, member: discord.Member=None):
    if (member == None):
        member = ctx.author
    pos = sum(((m.joined_at < member.joined_at) for m in ctx.guild.members if (m.joined_at is not None)))
    roles = [role for role in member.roles]
    embed = discord.Embed(title='👨 Info', color=discord.Color.random(), description=f'Information about: {member.name}')
    embed.add_field(name='Nickname', value=(member.nick or None))
    embed.add_field(name='Verification Pending', value=member.pending)
    embed.add_field(name='Status:', value=member.raw_status)
    if member.mobile_status:
        device = 'Mobile'
    elif member.desktop_status:
        device = 'Desktop'
    elif member.web_status:
        device = 'Web'
    embed.add_field(name='Discord Device:', value=device)
    embed.add_field(name='Color', value=member.color)
    embed.add_field(name='Mention:', value=member.mention)
    embed.add_field(name='Top Role:', value=member.top_role.mention)
    embed.add_field(name='Voice State:', value=(member.voice or None))
    embed.set_footer(icon_url=member.avatar_url, text=f'Requested By: {ctx.author.name}')
    (await ctx.send(embed=embed))