From ab46afee1db869046375f3e1c26b0cdb4dfdb3b7 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 13 Dec 2015 20:05:58 -0500 Subject: Changed functions that return a constant value into properties. --- discord/user.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'discord/user.py') diff --git a/discord/user.py b/discord/user.py index 35f39d94..973a9ae2 100644 --- a/discord/user.py +++ b/discord/user.py @@ -68,6 +68,7 @@ class User(object): return other.id != self.id return False + @property def avatar_url(self): """Returns a friendly URL version of the avatar variable the user has. An empty string if the user has no avatar.""" @@ -75,6 +76,7 @@ class User(object): return '' return 'https://discordapp.com/api/users/{0.id}/avatars/{0.avatar}.jpg'.format(self) + @property def mention(self): """Returns a string that allows you to mention the given user.""" return '<@{0.id}>'.format(self) -- cgit v1.2.3