diff --git a/DisCatSharp/Entities/Guild/DiscordMember.cs b/DisCatSharp/Entities/Guild/DiscordMember.cs index 2e41b2c4b8..1705c543e3 100644 --- a/DisCatSharp/Entities/Guild/DiscordMember.cs +++ b/DisCatSharp/Entities/Guild/DiscordMember.cs @@ -39,6 +39,8 @@ internal DiscordMember(DiscordUser user) this.Id = user.Id; + this.ManualUser = user; + this.RoleIdsInternal = []; this._roleIdsLazy = new(() => new ReadOnlyCollection(this.RoleIdsInternal)); } @@ -68,6 +70,11 @@ internal DiscordMember(TransportMember mbr) this.MemberFlags = mbr.MemberFlags; this.InteractionPermissions = mbr.Permissions; this.GuildAvatarDecorationData = mbr.GuildAvatarDecorationData; + if (mbr.User is not null) + this.ManualUser = new(mbr.User) + { + Discord = this.Discord + }; } /// @@ -162,7 +169,7 @@ public IReadOnlyList RoleIds /// /// Gets the list of roles associated with this member. - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public IReadOnlyList Roles @@ -170,7 +177,7 @@ public IReadOnlyList Roles /// /// Gets the color associated with this user's top color-giving role, otherwise 0 (no color). - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public DiscordColor Color @@ -240,7 +247,7 @@ public bool HasUnusualDmActivity /// /// Gets this member's voice state. - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public DiscordVoiceState? VoiceState @@ -254,7 +261,7 @@ public DiscordVoiceState? VoiceState /// /// Gets the guild of which this member is a part of. - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public DiscordGuild Guild @@ -262,7 +269,7 @@ public DiscordGuild Guild /// /// Gets whether this member is the Guild owner. - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public bool IsOwner @@ -287,7 +294,7 @@ public int Hierarchy /// /// Gets the permissions for the current member. - /// This will throw if accessed for an oauth2 constructed member. + /// This will throw if accessed for an oauth2 constructed member. /// [JsonIgnore] public Permissions Permissions