debug: enable MessageSaver, disable Automod, re-enable slow query logs

This commit is contained in:
Dragory 2021-10-05 23:28:16 +03:00
parent 0830f67736
commit 2d012bc5cf
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
3 changed files with 14 additions and 14 deletions

View file

@ -33,8 +33,8 @@ module.exports = {
synchronize: false,
connectTimeout: 2000,
// logging: ["error", "warn"],
// maxQueryExecutionTime: 1000,
logging: ["error", "warn"],
maxQueryExecutionTime: 1000,
// Entities
entities: [entities],

View file

@ -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);

View file

@ -30,16 +30,16 @@ export const MessageSaverPlugin = zeppelinGuildPlugin<MessageSaverPluginType>()(
// prettier-ignore
commands: [
// SaveMessagesToDBCmd,
// SavePinsToDBCmd,
SaveMessagesToDBCmd,
SavePinsToDBCmd,
],
// prettier-ignore
events: [
// MessageCreateEvt,
// MessageUpdateEvt,
// MessageDeleteEvt,
// MessageDeleteBulkEvt,
MessageCreateEvt,
MessageUpdateEvt,
MessageDeleteEvt,
MessageDeleteBulkEvt,
],
beforeLoad(pluginData) {