only remove pigments from confirmed guild members
All checks were successful
Build / build (18) (push) Successful in 47s
Build / build (20) (push) Successful in 59s
Build / build (22) (push) Successful in 42s
Build / build (22) (pull_request) Successful in 1m7s
Build / build (18) (pull_request) Successful in 57s
Build / build (20) (pull_request) Successful in 42s

This commit is contained in:
Sainan 2025-03-14 17:57:47 +01:00
parent 9c3db63c14
commit cf7d0c3bbf

View File

@ -352,7 +352,7 @@ export const hasGuildPermissionEx = (
}; };
export const removePigmentsFromGuildMembers = async (guildId: string | Types.ObjectId): Promise<void> => { export const removePigmentsFromGuildMembers = async (guildId: string | Types.ObjectId): Promise<void> => {
const members = await GuildMember.find({ guildId }, "accountId"); const members = await GuildMember.find({ guildId, status: 0 }, "accountId");
for (const member of members) { for (const member of members) {
const inventory = await getInventory(member.accountId.toString(), "MiscItems"); const inventory = await getInventory(member.accountId.toString(), "MiscItems");
const index = inventory.MiscItems.findIndex( const index = inventory.MiscItems.findIndex(