diff --git a/discord/user.py b/discord/user.py index 0d3f20304..acb03d5e0 100644 --- a/discord/user.py +++ b/discord/user.py @@ -93,6 +93,8 @@ class Note: def note(self) -> Optional[str]: """Returns the note. + There is an alias for this named :attr:`value`. + Raises ------- ClientException @@ -102,13 +104,22 @@ class Note: raise ClientException('Note is not fetched') return self._note - @cached_slot_property('_user') - def user(self) -> _Snowflake: - """:class:`Snowflake`: Returns the :class:`User` the note belongs to. + @property + def value(self) -> Optional[str]: + """Returns the note. + + This is an alias of :attr:`note`. - If the user isn't in the cache, it returns a - :class:`Object` instead. + Raises + ------- + ClientException + Attempted to access note without fetching it. """ + return self.note + + @cached_slot_property('_user') + def user(self) -> _Snowflake: + """:class:`Snowflake`: Returns the :class:`User` or :class:`Object` the note belongs to.""" user_id = self._user_id user = self._state.get_user(user_id) @@ -177,8 +188,8 @@ class Note: base = f'' def __len__(self) -> int: