Separate role adding/removing to two separate commands for clearer
help pages and to remove the conflict with the self-assignable roles
plugin.
Require the assignable_roles option to always be an array (even if an
empty one).
Allow role assignments to self.
Log role additions/removals via these commands with the right
moderator name (instead of relying on the auto-log from the event).
Development npm scripts now also listen for debuggers:
- Port 9229 for the bot
- Port 9239 for the api
Via Knub 28, PluginErrors are no longer used in development, which
helps with call stacks in debuggers (see Knub changelog).
Unhandled promise rejections are now treated as exceptions via nodejs
flag --unhandled-rejections=strict, which allows catching them with
a debugger.
The internal "error-tolerant" error handler is now only used in
production; in development, all unhandled errors cause the bot to
crash and are easily catchable by debuggers.
When reaction roles are set as exclusive, a user can only have 1
reaction role from that message. Others are removed automatically when
picking a role if needed.
The !clean response is intended to be deleted after a delay when
cleaning the current channel i.e. not specifying a different channel
to clean. This behaviour was reversed, so the response got deleted when
cleaning a different channel and stayed when cleaning the current
channel.
Post date will always be more or less the time the log message is posted.
The logMessage variable in the alert action contains the full,
formatted log message that would be posted in a log channel as the
AUTOMOD_ACTION log type.
This loose pre-check checks the config schema by treating every object
as partial. This means that if a property exists, it's guaranteed to be
the correct type (e.g. object). However, there's no guarantee that all
or any properties exist.
This allows preprocessStaticConfig implementations to be much less
defensive and thus reduce boilerplate.