Allow Automod to distinguish whether mod actions are manual or automatic (#179)
This commit is contained in:
parent
90b6f4bc86
commit
51db942d97
18 changed files with 106 additions and 32 deletions
|
@ -49,7 +49,14 @@ export const MuteAction = automodAction({
|
|||
const mutes = pluginData.getPlugin(MutesPlugin);
|
||||
for (const userId of userIdsToMute) {
|
||||
try {
|
||||
await mutes.muteUser(userId, duration, reason, { contactMethods, caseArgs }, rolesToRemove, rolesToRestore);
|
||||
await mutes.muteUser(
|
||||
userId,
|
||||
duration,
|
||||
reason,
|
||||
{ contactMethods, caseArgs, isAutomodAction: true },
|
||||
rolesToRemove,
|
||||
rolesToRestore,
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof RecoverablePluginError && e.code === ERRORS.NO_MUTE_ROLE_IN_CONFIG) {
|
||||
pluginData.getPlugin(LogsPlugin).log(LogType.BOT_ALERT, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue