mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
More info for [p]userinfo, fix avatar not showing up
Embed links in code blocks got fixed by Discord. As a fix, now the avatar URL shows up outside the code block. It might not look great but it's the only solution outside of downloading the avatar and uploading it everytime, which I don't find ideal.
This commit is contained in:
parent
9ded9420d0
commit
8da9487f52
@ -165,14 +165,26 @@ class General:
|
|||||||
if not roles: roles = ["None"]
|
if not roles: roles = ["None"]
|
||||||
data = "```python\n"
|
data = "```python\n"
|
||||||
data += "Name: {}\n".format(escape_mass_mentions(str(user)))
|
data += "Name: {}\n".format(escape_mass_mentions(str(user)))
|
||||||
|
data += "Nickname: {}\n".format(escape_mass_mentions(str(user.nick)))
|
||||||
data += "ID: {}\n".format(user.id)
|
data += "ID: {}\n".format(user.id)
|
||||||
|
if user.game is None:
|
||||||
|
pass
|
||||||
|
elif user.game.url is None:
|
||||||
|
data += "Playing: {}\n".format(escape_mass_mentions(str(user.game)))
|
||||||
|
else:
|
||||||
|
data += "Streaming: {} ({})\n".format(escape_mass_mentions(str(user.game)),
|
||||||
|
escape_mass_mentions(user.game.url))
|
||||||
passed = (ctx.message.timestamp - user.created_at).days
|
passed = (ctx.message.timestamp - user.created_at).days
|
||||||
data += "Created: {} ({} days ago)\n".format(user.created_at, passed)
|
data += "Created: {} ({} days ago)\n".format(user.created_at, passed)
|
||||||
passed = (ctx.message.timestamp - user.joined_at).days
|
passed = (ctx.message.timestamp - user.joined_at).days
|
||||||
data += "Joined: {} ({} days ago)\n".format(user.joined_at, passed)
|
data += "Joined: {} ({} days ago)\n".format(user.joined_at, passed)
|
||||||
data += "Roles: {}\n".format(", ".join(roles))
|
data += "Roles: {}\n".format(", ".join(roles))
|
||||||
data += "Avatar: {}\n".format(user.avatar_url)
|
if user.avatar_url != "":
|
||||||
data += "```"
|
data += "Avatar:"
|
||||||
|
data += "```"
|
||||||
|
data += user.avatar_url
|
||||||
|
else:
|
||||||
|
data += "```"
|
||||||
await self.bot.say(data)
|
await self.bot.say(data)
|
||||||
|
|
||||||
@commands.command(pass_context=True, no_pm=True)
|
@commands.command(pass_context=True, no_pm=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user