Fix time_snowflake not being documented

This commit is contained in:
Rapptz 2022-08-15 14:01:54 -04:00
parent 6b50fcd5e4
commit 596f2ca222
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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