def whois(self, ctx, user_id: int):
"""
Searches for a user via ID
"""
try:
with ctx.channel.typing():
user = await self.bot.get_user_info(user_id)
embed = discord.Embed(colour=discord.Colour(0x30f9c7), description="ID: {}".format(user.id),
timestamp=datetime.datetime.now())
embed.set_thumbnail(
url=user.avatar_url)
embed.set_author(name=user)
embed.set_footer(text="Who Is: User")
embed.add_field(name="Bot?", value=user.bot, inline=False)
embed.add_field(name="Account Creation Date", value=user.created_at, inline=False)
await ctx.send(embed=embed)
except discord.NotFound:
await ctx.send("`No user found under this ID`")
except discord.HTTPException:
await ctx.send("`Error collecting user information`")
return
评论列表
文章目录