mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts/discord-whois] print the default avatar URL
This commit is contained in:
parent
f32857ef1c
commit
2e543b7755
1 changed files with 7 additions and 1 deletions
|
@ -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)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue