test
This commit is contained in:
parent
5963ec05ca
commit
dea01b189b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user