allow loading spam detection module
Co-authored-by: Martin Löffler <contact@fatalerrorcoded.eu>
This commit is contained in:
parent
b986f1c585
commit
14f7d37c71
2 changed files with 10 additions and 0 deletions
9
bot/src/bot/modules/raid_detection.ts
Normal file
9
bot/src/bot/modules/raid_detection.ts
Normal file
|
@ -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));
|
||||||
|
}
|
|
@ -68,4 +68,5 @@ logger.info(`\
|
||||||
import('./bot/modules/metrics');
|
import('./bot/modules/metrics');
|
||||||
import('./bot/modules/bot_status');
|
import('./bot/modules/bot_status');
|
||||||
import('./bot/modules/fetch_all');
|
import('./bot/modules/fetch_all');
|
||||||
|
import('./bot/modules/raid_detection');
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue