mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-05 00:25:19 +00:00
Allow some custom commands in /warn and /ban
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// Utils
|
||||
const { displayUser, scheduleDeletion } = require('../../utils/tg');
|
||||
const { html } = require('../../utils/html');
|
||||
const { parse, strip } = require('../../utils/cmd');
|
||||
const { parse, strip, substom } = require('../../utils/cmd');
|
||||
|
||||
// Bot
|
||||
|
||||
@@ -63,7 +63,11 @@ const banHandler = async (ctx) => {
|
||||
);
|
||||
}
|
||||
|
||||
return ctx.ban({ admin: ctx.from, reason, userToBan });
|
||||
return ctx.ban({
|
||||
admin: ctx.from,
|
||||
reason: await substom(reason),
|
||||
userToBan,
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = banHandler;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
// Utils
|
||||
const { parse, strip } = require('../../utils/cmd');
|
||||
const { parse, strip, substom } = require('../../utils/cmd');
|
||||
const { scheduleDeletion } = require('../../utils/tg');
|
||||
|
||||
// DB
|
||||
@@ -53,7 +53,7 @@ const warnHandler = async (ctx) => {
|
||||
return ctx.warn({
|
||||
admin: ctx.from,
|
||||
amend: flags.has('amend'),
|
||||
reason,
|
||||
reason: await substom(reason),
|
||||
userToWarn,
|
||||
mode: 'manual',
|
||||
});
|
||||
|
Reference in New Issue
Block a user