catto.js 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bot.js +5 -5
- package/package.json +1 -1
package/Bot.js
CHANGED
|
@@ -262,7 +262,7 @@ module.exports = class extends EventEmitter {
|
|
|
262
262
|
} catch {}
|
|
263
263
|
}
|
|
264
264
|
if (this.options.auditFile) {
|
|
265
|
-
fs.writeFileSync(this.options.auditFile, JSON.stringify(this.auditDatabase, null, 2));
|
|
265
|
+
fs.writeFileSync(this.options.auditFile.replace("%", this.cluster ? this.cluster.id.toString() : "0"), JSON.stringify(this.auditDatabase, null, 2));
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
this.emit("running", { Discord });
|
|
@@ -332,7 +332,7 @@ module.exports = class extends EventEmitter {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
if (this.options.auditFile) {
|
|
335
|
-
fs.writeFileSync(this.options.auditFile, JSON.stringify(this.auditDatabase, null, 2));
|
|
335
|
+
fs.writeFileSync(this.options.auditFile.replace("%", this.cluster ? this.cluster.id.toString() : "0"), JSON.stringify(this.auditDatabase, null, 2));
|
|
336
336
|
}
|
|
337
337
|
if (!found) {
|
|
338
338
|
message.deletedBy = message.author;
|
|
@@ -348,10 +348,10 @@ module.exports = class extends EventEmitter {
|
|
|
348
348
|
});
|
|
349
349
|
this.auditDatabase = {};
|
|
350
350
|
if (this.options.auditFile) {
|
|
351
|
-
if (!fs.existsSync(this.options.auditFile)) {
|
|
352
|
-
fs.writeFileSync(this.options.auditFile, "{}");
|
|
351
|
+
if (!fs.existsSync(this.options.auditFile.replace("%", this.cluster ? this.cluster.id.toString() : "0"))) {
|
|
352
|
+
fs.writeFileSync(this.options.auditFile.replace("%", this.cluster ? this.cluster.id.toString() : "0"), "{}");
|
|
353
353
|
}
|
|
354
|
-
this.auditDatabase = JSON.parse(fs.readFileSync(this.options.auditFile).toString("utf-8"));
|
|
354
|
+
this.auditDatabase = JSON.parse(fs.readFileSync(this.options.auditFile.replace("%", this.cluster ? this.cluster.id.toString() : "0")).toString("utf-8"));
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
get cluster() {
|