Implement reactOnSeen
parent
ae3bf11d0b
commit
b566be85fe
|
@ -213,6 +213,15 @@ Make sure to do the necessary [port forwarding](https://portforward.com/) and ad
|
||||||
**Default:** `!`
|
**Default:** `!`
|
||||||
Prefix for bot commands
|
Prefix for bot commands
|
||||||
|
|
||||||
|
#### reactOnSeen
|
||||||
|
**Default:** `off`
|
||||||
|
If enabled, the bot will react to messages sent to it with the emoji defined in `reactOnSeenEmoji`
|
||||||
|
|
||||||
|
#### reactOnSeenEmoji
|
||||||
|
**Default:** `📨`
|
||||||
|
The emoji that the bot will react with when it sees a message. Requires `reactOnSeen` to be enabled.
|
||||||
|
Must be pasted in the config file as the Emoji representation and not as a unicode codepoint.
|
||||||
|
|
||||||
#### relaySmallAttachmentsAsAttachments
|
#### relaySmallAttachmentsAsAttachments
|
||||||
**Default:** `off`
|
**Default:** `off`
|
||||||
If enabled, small attachments from users are sent as real attachments rather than links in modmail threads.
|
If enabled, small attachments from users are sent as real attachments rather than links in modmail threads.
|
||||||
|
|
|
@ -121,6 +121,9 @@ const defaultConfig = {
|
||||||
"knex": null,
|
"knex": null,
|
||||||
|
|
||||||
"logDir": path.join(__dirname, '..', 'logs'),
|
"logDir": path.join(__dirname, '..', 'logs'),
|
||||||
|
|
||||||
|
"reactOnSeen": false,
|
||||||
|
"reactOnSeenEmoji": "\uD83D\uDCE8",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load config values from environment variables
|
// Load config values from environment variables
|
||||||
|
|
|
@ -163,6 +163,11 @@ class Thread {
|
||||||
dm_message_id: msg.id
|
dm_message_id: msg.id
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (config.reactOnSeen)
|
||||||
|
{
|
||||||
|
await msg.addReaction(config.reactOnSeenEmoji)
|
||||||
|
}
|
||||||
|
|
||||||
if (this.scheduled_close_at) {
|
if (this.scheduled_close_at) {
|
||||||
await this.cancelScheduledClose();
|
await this.cancelScheduledClose();
|
||||||
await this.postSystemMessage(`<@!${this.scheduled_close_id}> Thread that was scheduled to be closed got a new reply. Cancelling.`);
|
await this.postSystemMessage(`<@!${this.scheduled_close_id}> Thread that was scheduled to be closed got a new reply. Cancelling.`);
|
||||||
|
|
Loading…
Reference in New Issue