mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +00:00
Used new quietLink instead of link in /staff
1. It doesn't mention admins 2. It's more reliable (inline mentiones sometimes don't work)
This commit is contained in:
@@ -6,6 +6,11 @@ const escapeHtml = s => s
|
||||
const link = ({ id, first_name }) =>
|
||||
`<a href="tg://user?id=${id}">${escapeHtml(first_name)}</a>`;
|
||||
|
||||
const quietLink = (user) =>
|
||||
user.username
|
||||
? `<a href="t.me/${user.username}">${escapeHtml(user.first_name)}</a>`
|
||||
: link(user);
|
||||
|
||||
/**
|
||||
* @param {number} ms
|
||||
* Deletes messages after (ms) milliseconds
|
||||
@@ -19,5 +24,6 @@ const deleteAfter = ms => ctx =>
|
||||
module.exports = {
|
||||
deleteAfter,
|
||||
escapeHtml,
|
||||
link
|
||||
link,
|
||||
quietLink,
|
||||
};
|
||||
|
Reference in New Issue
Block a user