forked from Galactic/galactic-bot
fixes
This commit is contained in:
parent
ced20a25f7
commit
208b8fb515
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user