mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix time_snowflake not being documented
This commit is contained in:
parent
6b50fcd5e4
commit
596f2ca222
@ -377,10 +377,10 @@ def snowflake_time(id: int, /) -> datetime.datetime:
|
|||||||
def time_snowflake(dt: datetime.datetime, /, *, high: bool = False) -> int:
|
def time_snowflake(dt: datetime.datetime, /, *, high: bool = False) -> int:
|
||||||
"""Returns a numeric snowflake pretending to be created at the given date.
|
"""Returns a numeric snowflake pretending to be created at the given date.
|
||||||
|
|
||||||
When using as the lower end of a range, use ``time_snowflake(high=False) - 1``
|
When using as the lower end of a range, use ``time_snowflake(dt, high=False) - 1``
|
||||||
to be inclusive, ``high=True`` to be exclusive.
|
to be inclusive, ``high=True`` to be exclusive.
|
||||||
|
|
||||||
When using as the higher end of a range, use ``time_snowflake(high=True) + 1``
|
When using as the higher end of a range, use ``time_snowflake(dt, high=True) + 1``
|
||||||
to be inclusive, ``high=False`` to be exclusive.
|
to be inclusive, ``high=False`` to be exclusive.
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
@ -1372,6 +1372,8 @@ Utility Functions
|
|||||||
|
|
||||||
.. autofunction:: discord.utils.snowflake_time
|
.. autofunction:: discord.utils.snowflake_time
|
||||||
|
|
||||||
|
.. autofunction:: discord.utils.time_snowflake
|
||||||
|
|
||||||
.. autofunction:: discord.utils.oauth_url
|
.. autofunction:: discord.utils.oauth_url
|
||||||
|
|
||||||
.. autofunction:: discord.utils.remove_markdown
|
.. autofunction:: discord.utils.remove_markdown
|
||||||
|
Loading…
x
Reference in New Issue
Block a user