mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-05 08:35:22 +00:00
Handle and utilize message links
This commit is contained in:
@@ -15,6 +15,9 @@ const isCommand = R.pipe(
|
||||
const escapeHtml = s => s
|
||||
.replace(/</g, '<');
|
||||
|
||||
const msgLink = msg =>
|
||||
`https://t.me/c/${msg.chat.id.toString().slice(4)}/${msg.message_id}`;
|
||||
|
||||
const link = ({ id, first_name }) =>
|
||||
`<a href="tg://user?id=${id}">${escapeHtml(first_name)}</a>`;
|
||||
|
||||
@@ -57,6 +60,7 @@ module.exports = {
|
||||
escapeHtml,
|
||||
isCommand,
|
||||
link,
|
||||
msgLink,
|
||||
quietLink,
|
||||
scheduleDeletion,
|
||||
};
|
||||
|
Reference in New Issue
Block a user