Dragory 2020-08-16 18:27:51 +03:00
commit 041e095950
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
3 changed files with 23 additions and 0 deletions

View File

@ -222,6 +222,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.

View File

@ -323,6 +323,10 @@ class Thread {
await this._updateThreadMessage(threadMessage.id, { inbox_message_id: inboxMessage.id }); await this._updateThreadMessage(threadMessage.id, { inbox_message_id: inboxMessage.id });
} }
if (config.reactOnSeen) {
await msg.addReaction(config.reactOnSeenEmoji);
}
// Interrupt scheduled closing, if in progress // Interrupt scheduled closing, if in progress
if (this.scheduled_close_at) { if (this.scheduled_close_at) {
await this.cancelScheduledClose(); await this.cancelScheduledClose();

View File

@ -244,6 +244,16 @@
} }
}, },
"reactOnSeen": {
"$ref": "#/definitions/customBoolean",
"default": false
},
"reactOnSeenEmoji": {
"type": "string",
"default": "\uD83D\uDCE8"
},
"port": { "port": {
"type": "number", "type": "number",
"maximum": 65535, "maximum": 65535,