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

User objects username attribute is not populated #4471

Open
3 tasks done
Arbiter-S opened this issue Sep 30, 2024 · 0 comments
Open
3 tasks done

User objects username attribute is not populated #4471

Arbiter-S opened this issue Sep 30, 2024 · 0 comments

Comments

@Arbiter-S
Copy link

Code that causes the issue

GPs_list = [1234567891]
@client.on(events.NewMessage(chats=GPs_list))
async def handler(event):
    user = await event.get_sender()
    print(user.username)


client.start()
client.run_until_disconnected()

Expected behavior

User objects to have username attribute populated.

Actual behavior

Users have None as their username.

Traceback

None

Telethon version

1.37.0

Python version

3.12.4

Operating system (including distribution name and version)

Windows 11

Other details

I checked this with another 3rd party client named Plus and users did have usernames visible to my account. It might help to mention the group has their members list hidden.

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
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

No branches or pull requests

1 participant