diff --git a/discord/utils.py b/discord/utils.py index 52ff49a49..49e824de2 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -96,6 +96,7 @@ __all__ = ( 'as_chunks', 'format_dt', 'set_target', + 'MISSING', ) DISCORD_EPOCH = 1420070400000 @@ -104,6 +105,8 @@ _log = logging.getLogger(__name__) class _MissingSentinel: + __slots__ = () + def __eq__(self, other): return False diff --git a/docs/api.rst b/docs/api.rst index 69ba7c4f3..e76ea1f99 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1413,6 +1413,12 @@ Utility Functions .. autofunction:: discord.utils.set_target +.. data:: MISSING + + A type safe sentinel used in the library to represent something as missing. Used to distinguish from ``None`` values. + + .. versionadded:: 2.0 + .. _discord-api-enums: Enumerations