From f437ffe44ea55eb8e4f47aa99a4c92794a9b96d8 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 6 Mar 2016 03:47:25 -0500 Subject: Add created_at properties for Server and User. --- discord/user.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'discord/user.py') diff --git a/discord/user.py b/discord/user.py index b10d864b..0d08d0a9 100644 --- a/discord/user.py +++ b/discord/user.py @@ -24,6 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from .utils import snowflake_time + class User: """Represents a Discord user. @@ -102,3 +104,10 @@ class User: """ return channel.permissions_for(self) + @property + def created_at(self): + """Returns the user's creation time in UTC. + + This is when the user's discord account was created.""" + return snowflake_time(self.id) + -- cgit v1.2.3