Skip to content

Commit

Permalink
format: clean the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Dec 31, 2024
1 parent b627be0 commit bd071db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion bot/src/migrations/db/deleteSpecificUserData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const up = async () => {
logger.info(`platform info:${platform}`)

const guildConnection = await DatabaseManager.getInstance().getGuildDb(GUILD_ID)

const deleteGuildMemberResult = await guildConnection.models.GuildMember.deleteOne({
discordId: SPECIFIC_DISCORD_ID,
})
Expand Down
4 changes: 3 additions & 1 deletion bot/src/utils/guildIgnoredUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export async function removeIgnoredGuildMembers(guildId: string): Promise<void>
return
}

await DatabaseManager.getInstance().getGuildDb(guildId)
const guildConnection = await DatabaseManager.getInstance().getGuildDb(guildId)

await guildConnection.models.GuildMember.deleteMany({ discordId: { $in: ignoredUserIds } })
} catch (error) {
logger.error(error, `Failed to remove ignored GuildMembers for guild ${guildId}`)
}
Expand Down

0 comments on commit bd071db

Please sign in to comment.