Migrate to TypeScript (#1)

* rf: js -> ts

* [m] docs: add badges, lint
This commit is contained in:
Aidan 2025-04-29 15:52:20 -04:00 committed by GitHub
parent 2f532fdd0d
commit cee30dc642
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

9
Middleware.ts Normal file
View file

@ -0,0 +1,9 @@
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();
};
};