Repository: Rapptz/discord.py
File: discord/user.py (Python)

Code before:

        .. versionadded:: 2.0
        """
        return self.avatar or self.default_avatar

    @property
    def avatar_decoration(self) -> Optional[Asset]:
        """Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar decoration the user has.

        If the user has not set an avatar decoration, ``None`` is returned.

        .. versionadded:: 2.4
        """
        if self._avatar_decoration_data is not None:
            return Asset._from_avatar_decoration(self._state, self._avatar_decoration_data['asset'])
        return None

    @property
    def avatar_decoration_sku_id(self) -> Optional[int]:
        """Optional[:class:`int`]: Returns the SKU ID of the avatar decoration the user has.

        If the user has not set an avatar decoration, ``None`` is returned.

        .. versionadded:: 2.4
        """
        return _get_as_snowflake(self._avatar_decoration_data, 'sku_id')

    @property
    def banner(self) -> Optional[Asset]:
        """Optional[:class:`Asset`]: Returns the user's banner asset, if available.

        .. versionadded:: 2.0


        .. note::
            This information is only available via :meth:`Client.fetch_user`.
        """
        if self._banner is None:
            return None
        return Asset._from_user_banner(self._state, self.id, self._banner)

    @property
    def accent_colour(self) -> Optional[Colour]:
        """Optional[:class:`Colour`]: Returns the user's accent colour, if applicable.

        A user's accent colour is only shown if they do not have a banner.
        This will only be available if the user explicitly sets a colour.

        There is an alias for this named :attr:`accent_color`.

        .. versionadded:: 2.0

Review comment (suggestion):
```suggestion
        if self._avatar_decoration_data is not None:
            return _get_as_snowflake(self._avatar_decoration_data, 'sku_id')
        return None
```

Code after:

        .. versionadded:: 2.0
        """
        return self.avatar or self.default_avatar

    @property
    def avatar_decoration(self) -> Optional[Asset]:
        """Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar decoration the user has.

        If the user has not set an avatar decoration, ``None`` is returned.

        .. versionadded:: 2.4
        """
        if self._avatar_decoration_data is not None:
            return Asset._from_avatar_decoration(self._state, self._avatar_decoration_data['asset'])
        return None

    @property
    def avatar_decoration_sku_id(self) -> Optional[int]:
        """Optional[:class:`int`]: Returns the SKU ID of the avatar decoration the user has.

        If the user has not set an avatar decoration, ``None`` is returned.

        .. versionadded:: 2.4
        """
        if self._avatar_decoration_data is not None:
            return _get_as_snowflake(self._avatar_decoration_data, 'sku_id')
        return None

    @property
    def banner(self) -> Optional[Asset]:
        """Optional[:class:`Asset`]: Returns the user's banner asset, if available.

        .. versionadded:: 2.0


        .. note::
            This information is only available via :meth:`Client.fetch_user`.
        """
        if self._banner is None:
            return None
        return Asset._from_user_banner(self._state, self.id, self._banner)

    @property
    def accent_colour(self) -> Optional[Colour]:
        """Optional[:class:`Colour`]: Returns the user's accent colour, if applicable.

        A user's accent colour is only shown if they do not have a banner.
        This will only be available if the user explicitly sets a colour.

        There is an alias for this named :attr:`accent_color`.