This commit is contained in:
Erik 2022-07-24 13:28:35 +03:00
parent ab7893bc77
commit 5f19cad0df
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -95,7 +95,7 @@ class ImportCommand extends SlashCommand {
await this.client.mongodb.infractions.insertMany(imported);
guild._data.caseId = imported[imported.length-1].case;
} else { // Bump existing logs by the highest case id from imported logs
const highestOldId = imported[imported.length - 1];
const highestOldId = imported[imported.length - 1].case;
const existingLogs = await this.client.mongodb.infractions.find({ guild: guild.id });
for (const log of existingLogs) {
log.case += highestOldId;