mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-29 05:07:49 +00:00
17 lines
419 B
JavaScript
17 lines
419 B
JavaScript
'use strict';
|
||
|
||
// Utils
|
||
const { scheduleDeletion } = require('../../utils/tg');
|
||
|
||
// DB
|
||
const { managesGroup } = require('../../stores/group');
|
||
|
||
const linkHandler = async ({ chat, replyWithHTML }) => {
|
||
const group = await managesGroup({ id: chat.id });
|
||
|
||
return replyWithHTML('ℹ️ <b>Group\'s link:</b>\n\n' +
|
||
`<a href="${group.link}">${group.title}</a>`).then(scheduleDeletion);
|
||
};
|
||
|
||
module.exports = linkHandler;
|