Browse Source

Clean up documentation of utils.snowflake_time

pull/124/head
Rapptz 9 years ago
parent
commit
d133f9f761
  1. 4
      discord/utils.py
  2. 2
      docs/api.rst

4
discord/utils.py

@ -75,9 +75,7 @@ def parse_time(timestamp):
return None
def snowflake_time(id):
'''
Returns the creation date of a discord id.
'''
"""Returns the creation date in UTC of a discord id."""
return datetime.datetime.utcfromtimestamp(((int(id) >> 22) + DISCORD_EPOCH) / 1000)
def find(predicate, seq):

2
docs/api.rst

@ -333,6 +333,8 @@ Utility Functions
.. autofunction:: discord.utils.get
.. autofunction:: discord.utils.snowflake_time
.. _discord-api-enums:
Enumerations

Loading…
Cancel
Save