forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
ab7893bc77
commit
5f19cad0df
@ -95,7 +95,7 @@ class ImportCommand extends SlashCommand {
|
|||||||
await this.client.mongodb.infractions.insertMany(imported);
|
await this.client.mongodb.infractions.insertMany(imported);
|
||||||
guild._data.caseId = imported[imported.length-1].case;
|
guild._data.caseId = imported[imported.length-1].case;
|
||||||
} else { // Bump existing logs by the highest case id from imported logs
|
} 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 });
|
const existingLogs = await this.client.mongodb.infractions.find({ guild: guild.id });
|
||||||
for (const log of existingLogs) {
|
for (const log of existingLogs) {
|
||||||
log.case += highestOldId;
|
log.case += highestOldId;
|
||||||
|
Loading…
Reference in New Issue
Block a user