diff --git a/bot/src/bot/modules/raid_detection.ts b/bot/src/bot/modules/raid_detection.ts new file mode 100644 index 0000000..195b288 --- /dev/null +++ b/bot/src/bot/modules/raid_detection.ts @@ -0,0 +1,9 @@ +import path from 'path'; +import { client } from '../..'; +import logger from '../logger'; + +if (process.env['AUTOMOD_LOAD_SPAM_DETECTION']) { + logger.info('Importing spam detection'); + import(path.join(process.cwd(), '..', 'private', 'automod-spam-detection', 'dist', 'index.js')) + .then(mod => mod.raidDetection(client as any, logger, client.db, process.env.REDIS_URL)); +} diff --git a/bot/src/index.ts b/bot/src/index.ts index 0e453a0..e4d44ca 100644 --- a/bot/src/index.ts +++ b/bot/src/index.ts @@ -68,4 +68,5 @@ logger.info(`\ import('./bot/modules/metrics'); import('./bot/modules/bot_status'); import('./bot/modules/fetch_all'); + import('./bot/modules/raid_detection'); })();