Implement SpamWatch API banlist with Middleware and submodules
This commit is contained in:
parent
11653201db
commit
e84a16eb03
9 changed files with 34 additions and 17 deletions
|
@ -1,8 +1,10 @@
|
|||
const { getStrings } = require('../plugins/checklang.js');
|
||||
const resources = require('../props/resources.json');
|
||||
const { isOnSpamWatch } = require('../plugins/lib-spamwatch/spamwatch.js');
|
||||
const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(isOnSpamWatch);
|
||||
|
||||
module.exports = (bot) => {
|
||||
bot.help((ctx) => {
|
||||
bot.help(spamwatchMiddleware, async (ctx) => {
|
||||
const Strings = getStrings(ctx.from.language_code);
|
||||
ctx.replyWithPhoto(
|
||||
resources.lunaCat2, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue