Repository: Rapptz/discord.py
File: discord/app_commands/models.py (Python)

Code before:
    .. versionadded:: 2.0

    Attributes
    ------------
    type: :class:`~discord.AppCommandOptionType`
        The type of argument.
    name: :class:`str`
        The name of the argument.
    description: :class:`str`
        The description of the argument.
    name_localizations: Dict[:class:`~discord.Locale`, :class:`str`]
        The localised names of the argument. Used for display purposes.
    description_localizations: Dict[:class:`~discord.Locale`, :class:`str`]
        The localised descriptions of the argument. Used for display purposes.
    required: :class:`bool`
        Whether the argument is required.
    choices: List[:class:`Choice`]
        A list of choices for the command to choose from for this argument.
    parent: Union[:class:`AppCommand`, :class:`AppCommandGroup`]
        The parent application command that has this argument.
    channel_types: List[:class:`~discord.ChannelType`]
        The channel types that are allowed for this parameter.
    min_value: Optional[Union[:class:`int`, :class:`float`]]
        The minimum supported value for this parameter.
    max_value: Optional[Union[:class:`int`, :class:`float`]]
        The maximum supported value for this parameter.
    min_length: Optional[:class:`int`]
        The minimum allowed length for this parameter.
    max_length: Optional[:class:`int`]
        The maximum allowed length for this parameter.
    autocomplete: :class:`bool`
        Whether the argument has autocomplete.
    """

    __slots__ = (
        'type',
        'name',
        'description',
        'name_localizations',
        'description_localizations',
        'required',
        'choices',
        'channel_types',
        'min_value',
        'max_value',
        'min_length',
        'max_length',
        'autocomplete',
        'parent',
        '_state',
    )

Review comment (suggestion):
I think `self.guild` can be `None` here? That is probably why the type checker was complaing

Code after:
            if tag is not None:
                tags.append(tag)

        return tags

    @property
    def parent(self) -> Optional[Union[ForumChannel, TextChannel]]:
        """Optional[Union[:class:`~discord.ForumChannel`, :class:`~discord.TextChannel`]]: The parent channel
        this thread belongs to."""
        return self.guild.get_channel(self.parent_id)  # type: ignore

    @property
    def flags(self) -> ChannelFlags:
        """:class:`~discord.ChannelFlags`: The flags associated with this thread.

        .. versionadded:: 2.6
        """
        return ChannelFlags._from_value(self._flags)

    @property
    def owner(self) -> Optional[Member]:
        """Optional[:class:`~discord.Member`]: The member this thread belongs to.

        .. versionadded:: 2.6
        """
        return self.guild.get_member(self.owner_id)  # type: ignore

    @property
    def mention(self) -> str:
        """:class:`str`: The string that allows you to mention the thread."""
        return f'<#{self.id}>'

    @property
    def jump_url(self) -> str:
        """:class:`str`: Returns a URL that allows the client to jump to the thread.

        .. versionadded:: 2.6
        """
        return f'https://discord.com/channels/{self.guild_id}/{self.id}'

    @property
    def created_at(self) -> Optional[datetime]:
        """An aware timestamp of when the thread was created in UTC.

        .. note::

            This timestamp only exists for threads created after 9 January 2022, otherwise returns ``None``.
        """
        return self._created_at

    def resolve(self) -> Optional[Thread]: