View Avatar
This command views the avatar of a user, defaulting to the triggering user.
Trigger
Type: Regex
Trigger: \A(-|<@!?204255221017214977>\s*)(avatar|av|pfp)(\s+|\z)
Usage
-avatar
- Views your own avatar.-avatar <user>
- Views the avatar of the user provided.
Aliases
Instead of avatar
, you can also use av
or pfp
.
Code
{{/*
Views the avatar of a given user / the triggering user.
See <https://yagpdb-cc.github.io/info/avatar> for more information.
Author: jo3-l <https://github.com/jo3-l>
*/}}
{{ $user := .User }}
{{ $args := parseArgs 0 "**Syntax:** `-avatar [user]`" (carg "userid" "user") }}
{{ if $args.IsSet 0 }}
{{ $user = userArg ($args.Get 0) }}
{{ end }}
{{ sendMessage nil (cembed
"author" (sdict "name" (printf "%s (%d)" $user.String $user.ID) "icon_url" ($user.AvatarURL "256"))
"title" "❯ Avatar"
"image" (sdict "url" ($user.AvatarURL "2048"))
"color" 14232643
) }}
Author
This custom command was written by @jo3-l.