[scripts/discord-whois] print the default avatar URL

This commit is contained in:
Dmytro Meleshko 2020-12-28 01:31:04 +02:00
parent f32857ef1c
commit 2e543b7755
1 changed files with 7 additions and 1 deletions

View File

@ -51,7 +51,7 @@ data = response.json()
def print_field(name, value):
print(
"{}{}:{} {}".format(
colorama.Style.BRIGHT, name.rjust(12), colorama.Style.RESET_ALL, value
colorama.Style.BRIGHT, name.rjust(15), colorama.Style.RESET_ALL, value
)
)
@ -68,6 +68,12 @@ print_field(
data["id"], data["avatar"], "gif" if data["avatar"].startswith("a_") else "png"
),
)
print_field(
"Default avatar",
"https://cdn.discordapp.com/embed/avatars/{}.png".format(
int(data["discriminator"], 10) % 5
),
)
print_field("Bot", bool_to_yes_no(data.get("bot", False)))
print_field("System user", bool_to_yes_no(data.get("system", False)))