Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @commands.command(pass_context = True)
- async def whois(self, ctx, user: discord.Member = None):
- if user == None:
- user = ctx.message.author
- status = str(user.status)
- if status == "online":
- status = online
- elif status == "dnd":
- status = dnd
- elif status == "idle":
- status = idle
- elif status == "offline":
- status = offline
- joined_at = user.joined_at.__format__("%Y-%m-%d %H:%M %A")
- created_at = user.created_at.__format__("%Y-%m-%d %H:%M %A")
- nick = user.nick
- if nick == None:
- nick = "Nincs beállítva"
- game = user.game
- if game == None:
- game = "Jelenleg nem játszik semmit"
- embed = discord.Embed(colour = color())
- embed.add_field(name = "**Felhasználói információk**", value = "_ _")
- embed.add_field(name = "{} Név".format(emoji["bot"]), value = user.mention, inline = False)
- embed.add_field(name = "{} Becenév".format(emoji["happy"]), value = nick, inline = False)
- embed.add_field(name = "{} Azonosító".format(emoji["dev"]), value = user.id, inline = False)
- embed.add_field(name = "{} Státusz".format(emoji["servers"]), value = status, inline = False)
- embed.add_field(name = "{} Játék".format(emoji["play"]), value = game, inline = False)
- try:
- embed.add_field(name = "{} Legmagasabb rang".format(emoji["award"]), value = user.top_role.mention, inline = False)
- except:
- embed.add_field(name = "{} Legmagasabb rang".format(emoji["award"]), value = user.top_role, inline = False)
- embed.add_field(name = "{} Csatlakozott".format(emoji["invite"]), value = joined_at, inline = False)
- embed.add_field(name = "{} Regisztrált".format(emoji["create"]), value = created_at, inline = False)
- embed.set_author(name = user.name, icon_url = user.avatar_url)
- embed.set_thumbnail(url = user.avatar_url)
- embed.set_footer(text = footer())
- return await self.client.say(embed = embed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement