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