Skip to content

Commit 40656fd

Browse files
authored
docs: 📝 Document PrimaryGuild and User.primary_guild (#2937)
* 📝 Document `PrimaryGuild` and `User.primary_guild` * 🩹 Import `PrimaryGuild` in `__init__.py` * 📝 Requested changes
1 parent 2bf8fcd commit 40656fd

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

discord/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from .permissions import *
6262
from .player import *
6363
from .poll import *
64+
from .primary_guild import *
6465
from .raw_models import *
6566
from .reaction import *
6667
from .role import *

discord/user.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,10 @@ class User(BaseUser, discord.abc.Messageable):
556556
nameplate: Optional[:class:`Nameplate`]
557557
The user's nameplate, if the user has one.
558558
559+
.. versionadded:: 2.7
560+
primary_guild: Optional[:class:`PrimaryGuild`]
561+
The user's primary guild, if the user has one. Represent what guild the user's tag is from.
562+
559563
.. versionadded:: 2.7
560564
"""
561565

docs/api/models.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ Users
7171
.. automethod:: typing
7272
:async-with:
7373

74+
.. attributetable:: PrimaryGuild
75+
76+
.. autoclass:: PrimaryGuild()
77+
:members:
78+
7479
Messages
7580
--------
7681

0 commit comments

Comments
 (0)