diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/model/user.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/model/user.rs b/src/model/user.rs index 19d0a5d..d3f64f1 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -72,6 +72,13 @@ impl CurrentUser { }) } + /// Returns the formatted URL to the user's default avatar URL. + /// + /// This will produce a PNG URL. + pub fn default_avatar_url(&self) -> String { + cdn!("/embed/avatars/{}.png", self.discriminator % 5u16).to_owned() + } + /// Alias of [`tag`]. /// /// [`tag`]: #method.tag |