diff --git a/src/structure/components/commands/administration/Import.js b/src/structure/components/commands/administration/Import.js index 1538e74..d78c314 100644 --- a/src/structure/components/commands/administration/Import.js +++ b/src/structure/components/commands/administration/Import.js @@ -102,6 +102,7 @@ class ImportCommand extends SlashCommand { log.case += highestOldId; await this.client.mongodb.infractions.updateOne({ _id: log._id }, { case: log.case }); } + await this.client.mongodb.infractions.insertMant(imported); guild._data.caseId += highestOldId; } diff --git a/src/structure/components/commands/developer/Stats.js b/src/structure/components/commands/developer/Stats.js index 1a9be1a..6cece16 100644 --- a/src/structure/components/commands/developer/Stats.js +++ b/src/structure/components/commands/developer/Stats.js @@ -98,7 +98,7 @@ class StatsCommand extends SlashCommand { memoryUsed: (memoryTotal - memoryFree).toFixed(1), memoryTotal, osType: os.type(), - uptime: Util.humanise(Math.floor(Date.now()/1000) - os.uptime()), + uptime: Util.humanise(Math.floor((Date.now() - os.uptime()) / 1000)), hostname: os.hostname() }; diff --git a/src/structure/storage/interfaces/MongodbTable.js b/src/structure/storage/interfaces/MongodbTable.js index b097d7a..af5c6d6 100644 --- a/src/structure/storage/interfaces/MongodbTable.js +++ b/src/structure/storage/interfaces/MongodbTable.js @@ -172,7 +172,7 @@ class MongodbTable { _handleData(data) { //Convert data._id to Mongo ObjectIds if (data._id && !(data._id instanceof ObjectId)) { if (typeof data._id === 'string') data._id = ObjectId(data._id); - else if (typeof data._id === 'object') data._id = { + else if (data._id instanceof Array) data._id = { $in: Object.values(data._id)[0].map((id) => { return ObjectId(id); })