Advertisement
TheInfiniteCode

Untitled

May 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. @commands.command(pass_context = True)
  2. async def whois(self, ctx, user: discord.Member = None):
  3. if user == None:
  4. user = ctx.message.author
  5. status = str(user.status)
  6. if status == "online":
  7. status = online
  8. elif status == "dnd":
  9. status = dnd
  10. elif status == "idle":
  11. status = idle
  12. elif status == "offline":
  13. status = offline
  14. joined_at = user.joined_at.__format__("%Y-%m-%d %H:%M %A")
  15. created_at = user.created_at.__format__("%Y-%m-%d %H:%M %A")
  16. nick = user.nick
  17. if nick == None:
  18. nick = "Nincs beállítva"
  19. game = user.game
  20. if game == None:
  21. game = "Jelenleg nem játszik semmit"
  22. embed = discord.Embed(colour = color())
  23. embed.add_field(name = "**Felhasználói információk**", value = "_ _")
  24. embed.add_field(name = "{} Név".format(emoji["bot"]), value = user.mention, inline = False)
  25. embed.add_field(name = "{} Becenév".format(emoji["happy"]), value = nick, inline = False)
  26. embed.add_field(name = "{} Azonosító".format(emoji["dev"]), value = user.id, inline = False)
  27. embed.add_field(name = "{} Státusz".format(emoji["servers"]), value = status, inline = False)
  28. embed.add_field(name = "{} Játék".format(emoji["play"]), value = game, inline = False)
  29. try:
  30. embed.add_field(name = "{} Legmagasabb rang".format(emoji["award"]), value = user.top_role.mention, inline = False)
  31. except:
  32. embed.add_field(name = "{} Legmagasabb rang".format(emoji["award"]), value = user.top_role, inline = False)
  33. embed.add_field(name = "{} Csatlakozott".format(emoji["invite"]), value = joined_at, inline = False)
  34. embed.add_field(name = "{} Regisztrált".format(emoji["create"]), value = created_at, inline = False)
  35. embed.set_author(name = user.name, icon_url = user.avatar_url)
  36. embed.set_thumbnail(url = user.avatar_url)
  37. embed.set_footer(text = footer())
  38. return await self.client.say(embed = embed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement