parent
2f532fdd0d
commit
cee30dc642
3 changed files with 11 additions and 7 deletions
9
Middleware.ts
Normal file
9
Middleware.ts
Normal 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();
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue