Adds the Dt function thing
Again on mobile
This commit is contained in:
parent
6a9083a504
commit
d2837a34f3
@ -85,7 +85,6 @@ __all__ = (
|
||||
"as_chunks",
|
||||
"format_dt",
|
||||
"generate_snowflake",
|
||||
"quick_snowflake"
|
||||
)
|
||||
|
||||
DISCORD_EPOCH = 1420070400000
|
||||
@ -1047,7 +1046,7 @@ def generate_snowflake(dt: Optional[datetime.datetime] = None) -> int:
|
||||
:class:`int`
|
||||
The snowflake representing the time given.
|
||||
"""
|
||||
|
||||
dt = dt or utcnow()
|
||||
return int(dt.timestamp() * 1000 - DISCORD_EPOCH) << 22 | 0x3fffff
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user