mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 22:25:15 +00:00
admin tools
This commit is contained in:
10
index.js
10
index.js
@@ -26,9 +26,13 @@ const config = loadJSON('config.json');
|
|||||||
|
|
||||||
const bot = new Telegraf(config.token);
|
const bot = new Telegraf(config.token);
|
||||||
|
|
||||||
DEBUG && bot.command('adminme', ctx =>
|
bot.command('admin', ({ message, reply }) => {
|
||||||
(admins.admin(ctx.from),
|
const userToAdmin = message.reply_to_message
|
||||||
ctx.reply('Admined')));
|
? message.reply_to_message.from
|
||||||
|
: message.from;
|
||||||
|
return admins.admin(userToAdmin).then(() =>
|
||||||
|
reply('Admined ' + link(userToAdmin), replyOptions));
|
||||||
|
});
|
||||||
|
|
||||||
bot.on('new_chat_member', deleteAfter(10 * 60 * 1000));
|
bot.on('new_chat_member', deleteAfter(10 * 60 * 1000));
|
||||||
bot.on('left_chat_member', deleteAfter(10 * 60 * 1000));
|
bot.on('left_chat_member', deleteAfter(10 * 60 * 1000));
|
||||||
|
Reference in New Issue
Block a user