mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-22 18:08:51 +00:00
17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
// @ts-check
|
|
'use strict';
|
|
|
|
const { Client } = require('spamwatch');
|
|
|
|
const { config } = require('./config');
|
|
|
|
// eslint-disable-next-line func-names
|
|
exports.shouldKick = (function () {
|
|
if (!config.spamwatch) {
|
|
return () => false;
|
|
}
|
|
|
|
const client = new Client(config.spamwatch.token, config.spamwatch.host);
|
|
return ({ id }) => client.getBan(id);
|
|
}());
|