don't send reminder when no modmail in q
This commit is contained in:
parent
b71f64d15d
commit
14a0f0f1a0
@ -357,11 +357,13 @@ class Modmail {
|
||||
|
||||
const channel = this.reminderChannel;
|
||||
const amount = this.queue.length;
|
||||
let str = '';
|
||||
|
||||
if (!amount) str = 'No modmail in queue';
|
||||
else str = `${amount} modmail in queue.`;
|
||||
if (!amount) {
|
||||
if (this.lastReminder) await this.lastReminder.delete();
|
||||
return;
|
||||
}
|
||||
|
||||
const str = `${amount} modmail in queue.`;
|
||||
this.client.logger.debug(`Sending modmail reminder, #mm: ${amount}`);
|
||||
if (this.lastReminder) {
|
||||
if (channel.lastMessage.id === this.lastReminder.id) return this.lastReminder.edit(str);
|
||||
|
Loading…
Reference in New Issue
Block a user