3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-22 09:15:03 +00:00

automod: add triggers for mod actions

This commit is contained in:
Dragory 2021-02-14 16:58:02 +02:00
parent ce6ffd16cf
commit 30426960e7
34 changed files with 412 additions and 3 deletions

View file

@ -45,6 +45,7 @@ export async function unmuteUser(
member.edit(memberOptions);
}
} else {
// tslint:disable-next-line:no-console
console.warn(
`Member ${userId} not found in guild ${pluginData.guild.name} (${pluginData.guild.id}) when attempting to unmute`,
);
@ -95,6 +96,12 @@ export async function unmuteUser(
});
}
if (!unmuteTime) {
// If the member was unmuted, not just scheduled to be unmuted, fire the unmute event as well
// Scheduled unmutes have their event fired in clearExpiredMutes()
pluginData.state.events.emit("unmute", user.id, caseArgs.reason);
}
return {
case: createdCase,
};