Summary
Opening an issue as per @Plerx2493 's request on the discord. Under some circumstances role related properties & methods on DiscordGuild can throw due to the "Roles" property being null if accessed before GuildDownloadCompleted fires
What version of the library are you using?
v5.0.0-nightly (make sure you are using the latest nightly!)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 9.0
Operating System
Windows 11
Reproduction Steps
- Run a bot that is a member of at least one guild
- After connecting, immediately call DiscordClient.GetGuildAsync()
- On one of the returned guilds, call DiscordGuild.GetRoleAsync passing the guild id or access DiscordGuild.EveryoneRole
- NullReferenceException will be thrown
Trace Logs
Exceptions or other error messages
Anything else you'd like to share
No response