From 2e543b77559a9c565c83c993ab1edfab13aac9f2 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 28 Dec 2020 01:31:04 +0200 Subject: [PATCH] [scripts/discord-whois] print the default avatar URL --- scripts/discord-whois | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/discord-whois b/scripts/discord-whois index 6304df1..77211d2 100755 --- a/scripts/discord-whois +++ b/scripts/discord-whois @@ -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)))