forked from Galactic/modmail
more improvements
This commit is contained in:
parent
248a6a0f71
commit
557bc23248
@ -59,6 +59,7 @@ class ModmailClient extends Client {
|
||||
process.on('exit', this.saveCache.bind(this));
|
||||
process.on('SIGINT', () => {
|
||||
this.saveCache.bind(this);
|
||||
this.modmail.saveHistory();
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit();
|
||||
});
|
||||
|
@ -7,9 +7,12 @@ class Modmail {
|
||||
this.client = client;
|
||||
this.mainServer = null;
|
||||
this.bansServer = null;
|
||||
|
||||
this.categories = client._options.modmailCategory;
|
||||
this.graveyardInactive = client._options.graveyardInactive;
|
||||
this.readInactive = client._options.readInactive;
|
||||
this.channelSweepInterval = client._options.channelSweepInterval;
|
||||
this.saveInterval = client._options.saveInterval;
|
||||
|
||||
this.updatedThreads = [];
|
||||
this.mmcache = {};
|
||||
@ -35,8 +38,8 @@ class Modmail {
|
||||
this.replies = this.loadReplies();
|
||||
|
||||
// Sweep graveyard every 30 min and move stale channels to graveyard
|
||||
this.sweeper = setInterval(this.sweepChannels.bind(this), 5 * 60 * 1000);
|
||||
this.saver = setInterval(this.saveHistory.bind(this), 30 * 1000);
|
||||
this.sweeper = setInterval(this.sweepChannels.bind(this), this.channelSweepInterval * 60 * 1000);
|
||||
this.saver = setInterval(this.saveHistory.bind(this), this.saveInterval * 60 * 1000);
|
||||
|
||||
let logStr = `Started modmail handler for ${this.mainServer.name}`;
|
||||
if (this.bansServer) logStr += ` with ${this.bansServer.name} for ban appeals`;
|
||||
|
Loading…
Reference in New Issue
Block a user