Skip to content

Commit

Permalink
Merge pull request #313 from Airwav/patch-1
Browse files Browse the repository at this point in the history
fixed automod not muting after strikes reached/mute length
  • Loading branch information
Sai Teja Madha committed Feb 15, 2023
2 parents 614c8bc + 42be7d5 commit 610599d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers/ModUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { getSettings } = require("@schemas/Guild");
const { getMember } = require("@schemas/Member");
const { addModLogToDb } = require("@schemas/ModLog");

const DEFAULT_TIMEOUT_DAYS = 7;
const DEFAULT_TIMEOUT_HOURS = 24; //hours

const memberInteract = (issuer, target) => {
const { guild } = issuer;
Expand Down Expand Up @@ -141,12 +141,12 @@ module.exports = class ModUtils {
* @param {import('discord.js').GuildMember} issuer
* @param {import('discord.js').GuildMember} target
* @param {string} reason
* @param {"MUTE"|"KICK"|"SOFTBAN"|"BAN"} action
* @param {"TIMEOUT"|"KICK"|"SOFTBAN"|"BAN"} action
*/
static async addModAction(issuer, target, reason, action) {
switch (action) {
case "MUTE":
return ModUtils.timeoutTarget(issuer, target, DEFAULT_TIMEOUT_DAYS * 24 * 60, reason);
case "TIMEOUT":
return ModUtils.timeoutTarget(issuer, target, DEFAULT_TIMEOUT_HOURS * 60 * 60 * 1000, reason);

case "KICK":
return ModUtils.kickTarget(issuer, target, reason);
Expand Down

0 comments on commit 610599d

Please sign in to comment.