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

Guild.CurrentMember is null #1684

Closed
bakirov-eldar opened this issue Nov 16, 2023 · 2 comments
Closed

Guild.CurrentMember is null #1684

bakirov-eldar opened this issue Nov 16, 2023 · 2 comments
Milestone

Comments

@bakirov-eldar
Copy link

bakirov-eldar commented Nov 16, 2023

Guild.CurrentMember is null.
Exception: System.NullReferenceException. Object reference not set to an instance of an object

var guild = await client.GetGuildAsync(guildId, true);
var member = client.CurrentMember; \\Null
@Plerx2493
Copy link
Member

What version do you use?

@Plerx2493 Plerx2493 added the core label Nov 17, 2023
@Plerx2493 Plerx2493 added this to the v5.0 milestone Nov 17, 2023
@OoLunar
Copy link
Member

OoLunar commented Nov 17, 2023

When are you calling the code? Is it after you've called DiscordClient.ConnectAsync and after DiscordClient.GuildDownloadedComplete has fired?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants