kowalski-sw/Middleware.ts
Aidan cee30dc642
Migrate to TypeScript (#1)
* rf: js -> ts

* [m] docs: add badges, lint
2025-04-29 16:52:20 -03:00

9 lines
241 B
TypeScript

export default (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();
};
};