Dragory
5b0f9d31b7
Create new message types for staff reply edits/deletions
...
This has backwards-compatibility-breaking changes to the formatters
of staff reply edits/deletions, which now only receive the
thread message for the edit/deletion with the original data in
the thread message's metadata.
2020-10-12 20:54:54 +03:00
Dragory
f9671c385d
Add formatters for system messages
...
This has backwards-compatibility-breaking changes to the signature
of thread.postSystemMessage() and thread.sendSystemMessageToUser().
2020-10-12 20:33:49 +03:00
Dragory
aadda31069
Add metadata field for threads
...
Useful for e.g. storing plugin-specific data about a thread.
2020-10-12 19:57:39 +03:00
Dragory
0d2202d38c
Allow log storage handlers to store data. Add shouldSave() function to log storage handlers.
2020-10-03 16:10:27 +03:00
Dragory
3a7f7ffc90
Add support for alternative log storage types
2020-09-23 03:16:26 +03:00
Dragory
f5b6e46040
Add afterThreadClose plugin hook
2020-09-23 02:28:41 +03:00
Dragory
581b09a8ae
Fix thread header ping not working, utilize allowed_mentions
2020-08-21 05:13:24 +03:00
Dragory
fdabf65882
Fix thread alert_id being limited to 20 chars on MySQL
2020-08-18 22:43:08 +03:00
Dragory
883d8adf93
Fix crash when a user sends an attachment
...
Also added an eslint rule to catch similar errors caused by shadowed
variables in the future.
2020-08-17 11:26:06 +03:00
Dragory
cb6a9c2703
Merge #373
2020-08-16 18:58:25 +03:00
Dragory
7a671eab1f
Ignore errors from adding a reaction with reactOnSeen
2020-08-16 18:45:11 +03:00
Dragory
51df75e641
Set dm_channel_id directly from the message object
...
Allows us to set the channel id correctly for non-DM messages,
such as mentions that create a thread with createThreadOnMention
where the initial message is forwarded to the thread.
2020-08-16 18:42:22 +03:00
Dragory
041e095950
Merge #398
2020-08-16 18:27:51 +03:00
Dragory
25998fa8a2
Show a small note if a user messages the bot with e.g. a Spotify invite
2020-08-16 18:18:32 +03:00
Dragory
a4c7b84616
Add next_message_number to threads, use it for reply numbers
2020-08-14 01:18:45 +03:00
Dragory
296d1304a7
Reproducible formatters, add full log formatter
...
Format-specific parts of replies, including the role name and
attachments, are now stored in separate columns. This allows us to
store only one version of the actual message body and, by keeping
format-specific data separate, reproduce formatter results regardless
of when they are called. This cleans up code around message formats
significantly and was required to support !edit/!delete properly.
2020-08-14 00:42:32 +03:00
Dragory
86a060410f
Apply code style from .eslintrc
2020-08-13 00:08:37 +03:00
Dragory
d03903ce80
Move beforeNewThread hook after validations, fix a couple bugs
2020-08-12 23:19:11 +03:00
Dragory
ce8ebbfc2f
Propagate staff reply edits/deletions to the DB
2020-07-19 14:28:32 +03:00
Dragory
e74363a55c
Show staff reply numbers in threads/logs
2020-07-19 14:24:24 +03:00
Dragory
4e9e347b04
Add internal support for editing/deleting staff replies
2020-07-19 14:11:38 +03:00
Dragory
6b8c7e1bdf
Rename config.js to cfg.js
...
So people don't accidentally edit the config source file rather than
their own config file.
2020-07-19 13:36:07 +03:00
Dragory
75b2920777
Use explicit parameters for Thread#postSystemMessage, Thread#sendSystemMessageToUser, Thread#postNonLogMessage
2020-07-14 01:38:35 +03:00
Dragory
ec3a2455e0
Add more safeguards when using Thread#_postToThreadChannel()
2020-07-14 01:35:26 +03:00
Dragory
662c6b0c21
Allow message formatters to return full message content objects as well as strings
2020-07-14 01:31:50 +03:00
Dragory
8a975d7da4
Add message formatters. Expose message formatters to plugins.
2020-07-14 01:11:48 +03:00
eegras@eegrasstudios.com
b566be85fe
Implement reactOnSeen
2020-06-05 13:11:56 -05:00
Dragory
1538b25ee5
Fix error when receiving a reply to a thread that has had its channel deleted
2020-06-05 17:06:15 +03:00
Dragory
5c247fc73d
Fix for error with thread message number increment on MySQL
2020-05-25 23:09:45 +03:00
Dragory
6eb9b973c0
More consistent log formatting. Store DM channel IDs and inbox message IDs with thread messages. Add !dm_channel_id. Add message numbers to the database in preparation for !edit and !delete. Some code reorganisation.
2020-05-25 01:33:10 +03:00
Dark
c41f7a0978
Change to comma separated list
2020-02-18 01:22:00 +01:00
Dark
949a5efdb2
Allow multiple users to do !alert without overriding each other
2020-02-17 20:04:43 +01:00
Dragory
2ea858daac
Move plugin loading to its own file. Define plugin API more explicitly.
2019-09-18 02:15:22 +03:00
Dragory
a470b72016
Add attachmentStorage option
2019-03-06 23:31:24 +02:00
Dragory
688ab7ceea
Add support for scheduled !suspend
2019-03-06 21:37:36 +02:00
Dragory
188f7543ee
Allow silent scheduled closes. Make close time format stricter (no whitespace).
2019-03-06 21:15:09 +02:00
Dragory
5e1a1e7e15
Add 'silent' option to !close when closeMessage is specified
2019-02-23 23:32:18 +02:00
Dragory
86bc6fd809
Only delete the reply command if the bot was able to send the reply
2019-02-23 22:55:26 +02:00
Dragory
21d2a7453c
Add allowUserClose option. Fixes #69
2018-09-20 23:31:14 +03:00
Dragory
54e9fbd597
Chunk long messages so they don't fail to send
2018-05-03 20:33:19 +03:00
Dragory
5e1b5112a2
Add !alert
...
Using !alert in a modmail thread will ping you the next time the thread
gets a new reply. Use !alert cancel to cancel.
2018-04-21 16:39:38 +03:00
Dragory
ab3d70008a
Move more code from main.js to individual module files. Rename plugins -> modules. Remove some obsolete comments.
2018-03-13 07:45:31 +02:00
Dragory
434dab59ee
Fix some inconsistencies between DB drivers, also fixing scheduled closes on MySQL/MariaDB (again)
2018-03-13 06:23:32 +02:00
Dragory
07c0336f72
Also add that fix to the third place where it's needed
2018-03-11 23:20:59 +02:00
Dragory
2251cabe86
Additional fix for scheduling in MySQL/MariaDB
2018-03-11 23:19:45 +02:00
Dragory
119faf1d37
Commands used in threads are now saved again. Refactor some of the code into plugins.
2018-03-11 23:17:14 +02:00
Dragory
38bb553588
Scheduling fix for MySQL/MariaDB version 3000
2018-03-11 22:48:53 +02:00
Dragory
0b677d338e
Actually fix scheduled closing on MySQL/MariaDB
2018-03-11 22:42:40 +02:00
Dragory
b8a5021dd5
Add thread suspending
2018-03-11 22:27:52 +02:00
Dragory
751b18a12d
Add scheduled thread closing
...
A thread can be scheduled to be closed by adding a time parameter to
the !close command. For example, !close 2m would automatically close
the thread in 2 minutes. The actual scheduling is implemented with a
loop that runs every 2 seconds, checking for threads that should be
closed.
2018-03-11 21:32:14 +02:00