Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: guild.owner_id type mismatch between docs and code #1273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion disnake/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Guild(Hashable):
The channel that denotes the AFK channel. ``None`` if it doesn't exist.
id: :class:`int`
The guild's ID.
owner_id: :class:`int`
owner_id: :class:`Optional[int]`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
owner_id: :class:`Optional[int]`
owner_id: Optional[:class:`int`]

Optional needs to wrap the :class:, otherwise intersphinx unfortunately can't find it

The guild owner's ID. Use :attr:`Guild.owner` if you need a :class:`Member` object instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small note explaining why/when this can be None could be helpful:

Suggested change
The guild owner's ID. Use :attr:`Guild.owner` if you need a :class:`Member` object instead.
The guild owner's ID. Use :attr:`Guild.owner` if you need a :class:`Member` object instead.
This may be ``None`` if the guild is :attr:`~Guild.unavailable`.

unavailable: :class:`bool`
Whether the guild is unavailable. If this is ``True`` then the
Expand Down
Loading