Implement SpamWatch API banlist with Middleware and submodules

This commit is contained in:
lucmsilva651 2024-07-28 13:31:04 -03:00
parent 11653201db
commit e84a16eb03
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
9 changed files with 34 additions and 17 deletions

View file

@ -1,7 +1,9 @@
const { getStrings } = require('../plugins/checklang.js');
const { isOnSpamWatch } = require('../plugins/lib-spamwatch/spamwatch.js');
const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(isOnSpamWatch);
module.exports = (bot) => {
bot.command('privacy', (ctx) => {
bot.command('privacy', spamwatchMiddleware, async (ctx) => {
const Strings = getStrings(ctx.from.language_code);
ctx.reply(
Strings.lynxPrivacy, {