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
5
bot.js
5
bot.js
|
@ -1,5 +1,6 @@
|
|||
const { Telegraf } = require('telegraf');
|
||||
const Config = require('./props/config.json');
|
||||
const { isOnSpamWatch } = require('./plugins/lib-spamwatch/spamwatch.js');
|
||||
|
||||
const bot = new Telegraf(Config.botToken);
|
||||
|
||||
|
@ -11,8 +12,8 @@ const loadCommands = () => {
|
|||
fs.readdirSync(commandsPath).forEach((file) => {
|
||||
const command = require(path.join(commandsPath, file));
|
||||
if (typeof command === 'function') {
|
||||
command(bot);
|
||||
};
|
||||
command(bot, isOnSpamWatch);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue