mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
debug: re-enable Automod with extra profiling
This commit is contained in:
parent
2d012bc5cf
commit
53d7491c1b
8 changed files with 43 additions and 8 deletions
|
@ -193,15 +193,15 @@ export const AutomodPlugin = zeppelinGuildPlugin<AutomodPluginType>()({
|
|||
|
||||
// prettier-ignore
|
||||
events: [
|
||||
// RunAutomodOnJoinEvt,
|
||||
// RunAutomodOnMemberUpdate,
|
||||
// RunAutomodOnLeaveEvt,
|
||||
RunAutomodOnJoinEvt,
|
||||
RunAutomodOnMemberUpdate,
|
||||
RunAutomodOnLeaveEvt,
|
||||
// Messages use message events from SavedMessages, see onLoad below
|
||||
],
|
||||
|
||||
commands: [AntiraidClearCmd, SetAntiraidCmd, ViewAntiraidCmd],
|
||||
|
||||
async __beforeLoad(pluginData) {
|
||||
async beforeLoad(pluginData) {
|
||||
pluginData.state.queue = new Queue();
|
||||
|
||||
pluginData.state.regexRunner = getRegExpRunner(`guild-${pluginData.guild.id}`);
|
||||
|
@ -224,7 +224,7 @@ export const AutomodPlugin = zeppelinGuildPlugin<AutomodPluginType>()({
|
|||
pluginData.state.cachedAntiraidLevel = await pluginData.state.antiraidLevels.get();
|
||||
},
|
||||
|
||||
async __afterLoad(pluginData) {
|
||||
async afterLoad(pluginData) {
|
||||
pluginData.state.clearRecentActionsInterval = setInterval(() => clearOldRecentActions(pluginData), 1 * MINUTES);
|
||||
pluginData.state.clearRecentSpamInterval = setInterval(() => clearOldRecentSpam(pluginData), 1 * SECONDS);
|
||||
pluginData.state.clearRecentNicknameChangesInterval = setInterval(
|
||||
|
@ -289,7 +289,7 @@ export const AutomodPlugin = zeppelinGuildPlugin<AutomodPluginType>()({
|
|||
registerEventListenersFromMap(mutesEvents, pluginData.state.mutesListeners);
|
||||
},
|
||||
|
||||
async __beforeUnload(pluginData) {
|
||||
async beforeUnload(pluginData) {
|
||||
const countersPlugin = pluginData.getPlugin(CountersPlugin);
|
||||
countersPlugin.offCounterEvent("trigger", pluginData.state.onCounterTrigger);
|
||||
countersPlugin.offCounterEvent("reverseTrigger", pluginData.state.onCounterReverseTrigger);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue