haha karp goes brr
karpi karpunknown
python
4 years ago
1.9 kB
7
Indexable
@commands.command(aliases=["ui"])
async def userinfo(self, ctx, user: discord.Member=None):
if user:
voice_state = None if not user.voice else user.voice.channel
embed = discord.Embed(title="", description=f"\n**User Nickname** - {user.nick}\n**User ID** - {user.id}\n**Link to Avatar** - [Here]({user.avatar_url})\n**Highest Role** - {user.top_role.mention}\n**Roles** - {len(user.roles)}\n**Status** - {user.status}\n**In voice channel** - {voice_state}\n**Activity** - {user.activity}", color=0x71368a)
embed.set_author(name=f"{user}", icon_url=f"{user.avatar_url}")
embed.set_thumbnail(url=f"{user.avatar_url}")
created_at = user.created_at.strftime("%a, %#d %B %Y, %I:%M %p UTC")
joined_at = user.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC")
embed.set_footer(text=f"Created at {created_at} / Joined at: {joined_at}")
await ctx.reply(embed=embed)
else:
voice_state = None if not ctx.author.voice else ctx.author.voice.channel
embed1 = discord.Embed(title="", description=f"\n**User Nickname** - {ctx.author.nick}\n**User ID** - {ctx.author.id}\n**Link to Avatar** - [Here]({ctx.author.avatar_url})\n**Highest Role** - {ctx.author.top_role.mention}\n**Roles** - {len(ctx.author.roles)}\n**Status** - {ctx.author.status}\n **In voice channel** - {voice_state}\n**Activity** - {ctx.author.activity}", color=0x71368a)
embed1.set_author(name=f"{ctx.author}", icon_url=f"{ctx.author.avatar_url}")
embed1.set_thumbnail(url=f"{ctx.author.avatar_url}")
created_at = ctx.author.created_at.strftime("%a, %#d %B %Y, %I:%M %p UTC")
joined_at = ctx.author.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC")
embed1.set_footer(text=f"Created at {created_at} / Joined at: {joined_at}")
await ctx.reply(embed=embed1)Editor is loading...