'use strict'; // Bot const bot = require('../../bot'); // DB const { managesGroup } = require('../../stores/group'); const linkHandler = async ({ chat, replyWithHTML }) => { const group = await managesGroup({ id: chat.id }); const { message_id } = await replyWithHTML( 'ℹ️ Group\'s link:\n\n' + `${group.title}` ); return setTimeout(() => bot.telegram.deleteMessage(chat.id, message_id), 5 * 60 * 1000); }; module.exports = linkHandler;