mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Add tempbans (#139)
This commit is contained in:
parent
d8e721c9de
commit
a7e01ae4e5
11 changed files with 372 additions and 37 deletions
|
@ -36,6 +36,8 @@ import { MassmuteCmd } from "./commands/MassmuteCmd";
|
|||
import { trimPluginDescription } from "../../utils";
|
||||
import { DeleteCaseCmd } from "./commands/DeleteCaseCmd";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans";
|
||||
import { outdatedTempbansLoop } from "./functions/outdatedTempbansLoop";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -49,6 +51,7 @@ const defaultOptions = {
|
|||
warn_message: "You have received a warning on the {guildName} server: {reason}",
|
||||
kick_message: "You have been kicked from the {guildName} server. Reason given: {reason}",
|
||||
ban_message: "You have been banned from the {guildName} server. Reason given: {reason}",
|
||||
tempban_message: "You have been banned from the {guildName} server for {banTime}. Reason given: {reason}",
|
||||
alert_on_rejoin: false,
|
||||
alert_channel: null,
|
||||
warn_notify_enabled: false,
|
||||
|
@ -165,8 +168,17 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()("mod
|
|||
|
||||
state.mutes = GuildMutes.getGuildInstance(guild.id);
|
||||
state.cases = GuildCases.getGuildInstance(guild.id);
|
||||
state.tempbans = GuildTempbans.getGuildInstance(guild.id);
|
||||
state.serverLogs = new GuildLogs(guild.id);
|
||||
|
||||
state.unloaded = false;
|
||||
state.outdatedTempbansTimeout = null;
|
||||
state.ignoredEvents = [];
|
||||
|
||||
outdatedTempbansLoop(pluginData);
|
||||
},
|
||||
|
||||
onUnload(pluginData) {
|
||||
pluginData.state.unloaded = true;
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue