automod: add default configs for actions
This commit is contained in:
parent
6324b9654b
commit
ae97a5dded
16 changed files with 64 additions and 19 deletions
|
@ -14,6 +14,10 @@ export const MuteAction = automodAction({
|
|||
notifyChannel: tNullable(t.string),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
notify: null, // Use defaults from ModActions
|
||||
},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, matchResult }) {
|
||||
const duration = actionConfig.duration ? convertDelayStringToMS(actionConfig.duration) : null;
|
||||
const reason = actionConfig.reason || "Muted automatically";
|
||||
|
@ -21,9 +25,7 @@ export const MuteAction = automodAction({
|
|||
|
||||
const caseArgs = {
|
||||
modId: pluginData.client.user.id,
|
||||
extraNotes: [
|
||||
matchResult.summary, // TODO
|
||||
],
|
||||
extraNotes: [matchResult.fullSummary],
|
||||
};
|
||||
|
||||
const userIdsToMute = unique(contexts.map(c => c.user?.id).filter(Boolean));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue