3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Allow automod to issue tempbans (#189)

This commit is contained in:
Nils 2021-04-28 21:42:54 +02:00 committed by GitHub
parent cab20fa295
commit c2c3470994
5 changed files with 36 additions and 15 deletions

View file

@ -172,6 +172,7 @@ export const BanCmd = modActionsCmd({
ppId: mod.id !== msg.author.id ? msg.author.id : undefined,
},
deleteMessageDays,
modId: mod.id,
},
time,
);
@ -184,12 +185,6 @@ export const BanCmd = modActionsCmd({
let forTime = "";
if (time && time > 0) {
if (existingTempban) {
pluginData.state.tempbans.updateExpiryTime(user.id, time, mod.id);
} else {
pluginData.state.tempbans.addTempban(user.id, time, mod.id);
}
forTime = `for ${humanizeDuration(time)} `;
}