Skip to content

Member.display_banner can wrongfully return None #2866

@ToothyDev

Description

@ToothyDev

Summary

Member.display_banner will wrongfully return None if there is no guild-specific banner, but a global banner

Reproduction Steps

  1. Set a banner for your account, make sure you don't have a guild-specific banner in the guild you test this in
  2. Make a member command (or similar) where you can get your member object, and print member.display_banner
  3. It will be None despite there being a banner (your global one)

Minimal Reproducible Code

@discord.user_command()
async def bannertest(self, ctx, member):
    await ctx.respond(member.display_banner)

Expected Results

I expect Member.display_banner to have the same fallback to the globally set Asset like Member.display_avatar does

Actual Results

The fallback (it is there in the code) doesn't fetch the User object when returning the fallback user banner. Since User.banner is only available via fetch, this will always be None

Intents

All of them

System Information

  • Python v3.13.2-final
  • py-cord v2.6.1-final (idk why it says this, I'm using the git version)
  • aiohttp v3.11.18
  • system info: Windows 11 10.0.26100

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugA bug report that needs triaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions