Skip to content

Commit 94f03db

Browse files
Lee4testUnBonWhiskyPaillat-devDorukyumLulalaby
committed
fix: improve docstring wording of display methods (#3120)
* fix: Improve docstring wording of 'for regular members' * Improve docstring wording of display methods * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/user.py Signed-off-by: Paillat <jeremiecotti@ik.me> --------- Signed-off-by: Paillat <jeremiecotti@ik.me> Co-Authored-By: ffouqueray <flavien.fouqueray@icloud.com> Co-Authored-By: Paillat <paillat@pycord.dev> Co-Authored-By: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-Authored-By: Lala Sabathil <lala@pycord.dev> Co-Authored-By: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-Authored-By: Paillat <jeremiecotti@ik.me>
1 parent 6cc9318 commit 94f03db

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

discord/member.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,8 @@ def display_name(self) -> str:
663663
def display_avatar(self) -> Asset:
664664
"""Returns the member's display avatar.
665665
666-
For regular members this is just their avatar, but
667-
if they have a guild specific avatar then that
668-
is returned instead.
666+
Returns the user's guild avatar.
667+
If the user does not have a guild avatar, their global avatar is returned instead.
669668
670669
.. versionadded:: 2.0
671670
"""
@@ -688,9 +687,8 @@ def guild_avatar(self) -> Asset | None:
688687
def display_avatar_decoration(self) -> Asset | None:
689688
"""Returns the member's displayed avatar decoration.
690689
691-
For regular members this is just their avatar decoration, but
692-
if they have a guild specific avatar decoration then that
693-
is returned instead.
690+
Returns the user's guild avatar decoration.
691+
If the user does not have a guild avatar decoration, their global avatar decoration is returned instead.
694692
695693
.. versionadded:: 2.8
696694
"""
@@ -713,9 +711,8 @@ def guild_avatar_decoration(self) -> Asset | None:
713711
def display_banner(self) -> Asset | None:
714712
"""Returns the member's display banner.
715713
716-
For regular members this is just their banner, but
717-
if they have a guild specific banner then that
718-
is returned instead.
714+
Returns the user's guild banner.
715+
If the user does not have a guild banner, their global banner is returned instead.
719716
720717
.. versionadded:: 2.7
721718
"""

discord/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ def default_avatar(self) -> Asset:
251251
def display_avatar(self) -> Asset:
252252
"""Returns the user's display avatar.
253253
254-
For regular users this is just their default avatar or uploaded avatar.
254+
Returns the user's uploaded avatar.
255+
If the user has not uploaded any avatar, their default avatar is returned instead.
255256
256257
.. versionadded:: 2.0
257258
"""

0 commit comments

Comments
 (0)