We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5aa974 commit b11a35aCopy full SHA for b11a35a
handlers/middlewares/kickBanned.js
@@ -1,26 +1,12 @@
1
'use strict';
2
3
-const dedent = require('dedent-js');
4
-
5
-// Utils
6
-const { link } = require('../../utils/tg');
7
8
-const { replyOptions } = require('../../bot/options');
9
10
-const kickBannedHandler = async (ctx, next) => {
+const kickBannedHandler = (ctx, next) => {
11
if (ctx.chat.type === 'private') {
12
return next();
13
}
14
if (ctx.from.status === 'banned') {
15
ctx.deleteMessage();
16
- await ctx.kickChatMember(ctx.from.id);
17
- return ctx.replyWithHTML(
18
- dedent(`
19
- 🚫 ${link(ctx.from)} <b>is banned</b>!
20
21
- Reason: ${ctx.from.ban_reason}`),
22
- replyOptions
23
- );
+ return ctx.kickChatMember(ctx.from.id);
24
25
26
};
0 commit comments