Skip to content

fix(members): make sure the member's inner user is updated#2970

Merged
Lulalaby merged 3 commits into
Pycord-Development:masterfrom
Soheab:fix/fetched-member-user
Oct 21, 2025
Merged

fix(members): make sure the member's inner user is updated#2970
Lulalaby merged 3 commits into
Pycord-Development:masterfrom
Soheab:fix/fetched-member-user

Conversation

@Soheab

@Soheab Soheab commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Summary

Fixes #2866

Test code
import discord
from discord.ext import commands

bot = commands.Bot(
    command_prefix=commands.when_mentioned, intents=discord.Intents.all()
)


@bot.event
async def on_ready():
    print(f"Logged in as {bot.user} (ID: {bot.user.id})")
    guild = bot.get_guild(...)
    if not guild:
        return
    member = guild.get_member(...)
    if not member:
        return

    print("CACHED MEMBER:")
    print(f"  Banner: {member.banner}", member._user.banner)
    print(f"  Avatar: {member.avatar}", member._user.avatar)
    print(f"  Guild Banner: {member.guild_banner}")
    print(f"  Guild Avatar: {member.guild_avatar}")
    print(f"  Display Banner: {member.display_banner}")
    print(f"  Display Avatar: {member.display_avatar}")

    fetched_member = await guild.fetch_member(150665783268212746)
    print("FETCHED MEMBER:")
    print(f"  Banner: {fetched_member.banner}", fetched_member._user.banner)
    print(f"  Avatar: {fetched_member.avatar}", fetched_member._user.avatar)
    print(f"  Guild Banner: {fetched_member.guild_banner}")
    print(f"  Guild Avatar: {fetched_member.guild_avatar}")
    print(f"  Display Banner: {fetched_member.display_banner}")
    print(f"  Display Avatar: {fetched_member.display_avatar}")


bot.run("...")

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@Soheab
Soheab requested review from a team as code owners October 21, 2025 13:54
@Soheab
Soheab requested review from a user, JustaSqu1d, Paillat-dev and plun1331 October 21, 2025 13:54
@pycord-app

pycord-app Bot commented Oct 21, 2025

Copy link
Copy Markdown

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/2970/head:pr-2970
git checkout pr-2970

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/2970/head

@DA-344 DA-344 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

noice

@Lulalaby
Lulalaby merged commit 87a9dcd into Pycord-Development:master Oct 21, 2025
32 checks passed
Paillat-dev pushed a commit to Pycord-Development/pycord-next that referenced this pull request Oct 26, 2025
…velopment#2970)

* fix: make sure the member's inner user is updated when fetched

* chore: add changelog

* style(pre-commit): auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 87a9dcd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Member.display_banner can wrongfully return None

3 participants