mirror of
https://github.com/abocn/TelegramBot-SpamWatch.git
synced 2025-03-10 12:49:57 +00:00
9 lines
243 B
JavaScript
9 lines
243 B
JavaScript
|
module.exports = (isOnSpamWatch) => {
|
||
|
return async (ctx, next) => {
|
||
|
if (await isOnSpamWatch(ctx.from.id)) {
|
||
|
console.log(`User ${ctx.from.id} is banned on SpamWatch. Blocking command.`);
|
||
|
return;
|
||
|
}
|
||
|
await next();
|
||
|
};
|
||
|
};
|