mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 23:25:02 +00:00
Revert "Add a warning when the user has >= specified amount of warns"
This reverts commit 930dabf5cd
.
This commit is contained in:
parent
930dabf5cd
commit
25fb2ebf94
2 changed files with 0 additions and 25 deletions
|
@ -266,19 +266,4 @@ export class CasesPlugin extends ZeppelinPlugin<ICasesPluginConfig> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getCaseTypeAmountForUserId(userID: string, type: CaseTypes) {
|
|
||||||
const cases = (await this.cases.getByUserId(userID)).filter(c => !c.is_hidden);
|
|
||||||
let typeAmount = 0;
|
|
||||||
|
|
||||||
if (cases.length > 0) {
|
|
||||||
cases.forEach(singleCase => {
|
|
||||||
if (singleCase.type == type.valueOf()) {
|
|
||||||
typeAmount++;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return typeAmount;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ interface IModActionsPluginConfig {
|
||||||
ban_message: string;
|
ban_message: string;
|
||||||
alert_on_rejoin: boolean;
|
alert_on_rejoin: boolean;
|
||||||
alert_channel: string;
|
alert_channel: string;
|
||||||
warn_amount_notify_threshhold: number;
|
|
||||||
|
|
||||||
can_note: boolean;
|
can_note: boolean;
|
||||||
can_warn: boolean;
|
can_warn: boolean;
|
||||||
|
@ -98,7 +97,6 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
ban_message: "You have been banned from {guildName}. Reason given: {reason}",
|
ban_message: "You have been banned from {guildName}. Reason given: {reason}",
|
||||||
alert_on_rejoin: false,
|
alert_on_rejoin: false,
|
||||||
alert_channel: null,
|
alert_channel: null,
|
||||||
warn_amount_notify_threshhold: 5,
|
|
||||||
|
|
||||||
can_note: false,
|
can_note: false,
|
||||||
can_warn: false,
|
can_warn: false,
|
||||||
|
@ -446,14 +444,6 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const priorWarnAmount = (await casesPlugin.getCaseTypeAmountForUserId(memberToWarn.id, CaseTypes.Warn)) - 1;
|
|
||||||
if (priorWarnAmount >= config.warn_amount_notify_threshhold) {
|
|
||||||
this.sendErrorMessage(
|
|
||||||
msg.channel,
|
|
||||||
`The user already has ${(await priorWarnAmount) - 1} prior warnings ${msg.author.mention}!`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.serverLogs.log(LogType.MEMBER_WARN, {
|
this.serverLogs.log(LogType.MEMBER_WARN, {
|
||||||
mod: stripObjectToScalars(mod.user),
|
mod: stripObjectToScalars(mod.user),
|
||||||
member: stripObjectToScalars(memberToWarn, ["user", "roles"]),
|
member: stripObjectToScalars(memberToWarn, ["user", "roles"]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue