This commit is contained in:
JDJG Inc. Official 2021-10-03 22:49:08 -04:00
parent 5963ec05ca
commit dea01b189b

View File

@ -1044,11 +1044,18 @@ def generate_snowflake(dt: datetime.datetime) -> int:
return int(dt.timestamp() * 1000 - DISCORD_EPOCH) << 22 | 0x3fffff
def quick_snowflake() -> int:
#""":class:`int` Returns with The snowflake representing a snowflake from the immediate time.
#"""
"""A helper function to return a snowflake from the current UTC time.
Returns
--------
:class:`int`
The snowflake generated from the current time using utcnow.
"""
return int(utcnow().timestamp() * 1000 - DISCORD_EPOCH) << 22 | 0x3fffff