forked from Galactic/modmail
configurable inline response
This commit is contained in:
parent
a5ea2be87a
commit
956807ab09
@ -18,6 +18,7 @@ module.exports = {
|
||||
modmailReminderInterval: 10, // How often the bot should send a reminder of x new modmails in queue
|
||||
modmailReminderChannel: '', // channel to send reminders in
|
||||
logChannel: '', // Channel in which modmail logs are sent
|
||||
inlineResponse: null, // The response the bot gives when a user DMs the bot, null will have the bot use the default
|
||||
clientOptions: {
|
||||
intents: [ // Needs at least these
|
||||
'GUILDS',
|
||||
|
@ -22,6 +22,7 @@ class Modmail {
|
||||
this._reminderChannel = opts.modmailReminderChannel || null;
|
||||
this._logChannel = opts.logChannel || null;
|
||||
this.categories = opts.modmailCategory;
|
||||
this.inlineResponse = opts.inlineResponse || `Thank you for your message, we'll get back to you soon!`;
|
||||
|
||||
this.updatedThreads = [];
|
||||
this.queue = [];
|
||||
@ -143,7 +144,7 @@ class Modmail {
|
||||
|
||||
const lastActivity = this.cache.lastActivity[author.id];
|
||||
if (!lastActivity || now - lastActivity > 30 * 60) { // No point in sending this for *every* message
|
||||
await author.send(`Thank you for your message, we'll get back to you soon!`);
|
||||
await author.send(this.inlineResponse);
|
||||
}
|
||||
this.cache.lastActivity[author.id] = now;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user