forked from Galactic/modmail
bugfix
This commit is contained in:
parent
dfb0c794ba
commit
94b70b57a5
@ -48,7 +48,7 @@ class JsonCache extends CacheHandler {
|
|||||||
|
|
||||||
savePersistentCache () {
|
savePersistentCache () {
|
||||||
this.logger.debug('Saving cache');
|
this.logger.debug('Saving cache');
|
||||||
fs.writeFileSync('./persistent_cache.json', JSON.stringify(this.json));
|
fs.writeFileSync('./persistent_cache.json', JSON.stringify(this.json, null, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveModmailHistory () {
|
saveModmailHistory () {
|
||||||
@ -62,7 +62,7 @@ class JsonCache extends CacheHandler {
|
|||||||
for (const id of toSave) {
|
for (const id of toSave) {
|
||||||
const path = `./modmail_cache/${id}.json`;
|
const path = `./modmail_cache/${id}.json`;
|
||||||
try {
|
try {
|
||||||
fs.writeFileSync(path, JSON.stringify(this.modmail[id]));
|
fs.writeFileSync(path, JSON.stringify(this.modmail[id], null, 4));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.logger.error(`Error during saving of history\n${id}\n${JSON.stringify(this.modmail)}\n${err.stack}`);
|
this.client.logger.error(`Error during saving of history\n${id}\n${JSON.stringify(this.modmail)}\n${err.stack}`);
|
||||||
}
|
}
|
||||||
|
@ -378,7 +378,7 @@ class Modmail {
|
|||||||
|
|
||||||
if (!amount) {
|
if (!amount) {
|
||||||
if (this.lastReminder) {
|
if (this.lastReminder) {
|
||||||
await this.lastReminder.delete();
|
await this.lastReminder.delete().catch(() => null);
|
||||||
this.lastReminder = null;
|
this.lastReminder = null;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user