3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Always fetch fresh member data when unmuting v2: electric boogaloo

This commit is contained in:
Dragory 2021-08-20 22:27:35 +03:00
parent 3a9caae758
commit be0f9182a0
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -20,7 +20,7 @@ export async function unmuteUser(
): Promise<UnmuteResult | null> {
const existingMute = await pluginData.state.mutes.findExistingMuteForUserId(userId);
const user = await resolveUser(pluginData.client, userId);
const member = await resolveMember(pluginData.client, pluginData.guild, userId); // Grab the fresh member so we don't have stale role info
const member = await resolveMember(pluginData.client, pluginData.guild, userId, true); // Grab the fresh member so we don't have stale role info
const modId = caseArgs.modId || pluginData.client.user!.id;
if (!existingMute && member && !memberHasMutedRole(pluginData, member)) return null;