guildMemberRemove uncached members

So I am capturing guildMemberRemove events and I have the GuildMember and User partials selected. When the member leaves the guild I have to check if the member had certain roles and if they did, update my database to say they are no longer have those rights. The problem is if the member is not cached when the event fires, calling member.fetch() will return an Uknown Member APIError. I assume this is because the member no longer exists so you cannot fetch them. What would be the best way to handle checking the roles of uncached members after they leave so i can update my database?
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MrMythical
MrMythical2y ago
you can't really do this, since the member literally doesn't exist anymore if they weren't cached before, you cannot get their data from when they were a member
Mirai-Miki
Mirai-Miki2y ago
The documentation says the only thing i can excpet from a partial is the ID, would the partial of a GuildMember contain the user object? or can i expect that won't be their either?
MrMythical
MrMythical2y ago
yes there should be a user
Mirai-Miki
Mirai-Miki2y ago
ok I will probably have to do the checks in the backend rather then the frontend then. Thanks