From 5e3fd17436a2a97e3cb0bd7a90eff3ef07857f13 Mon Sep 17 00:00:00 2001 From: coder2020official Date: Sat, 21 May 2022 17:39:45 +0500 Subject: [PATCH] Added ability to hide a link in text --- telebot/formatting.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/telebot/formatting.py b/telebot/formatting.py index d13ba88..abec962 100644 --- a/telebot/formatting.py +++ b/telebot/formatting.py @@ -198,4 +198,14 @@ def hpre(content: str, escape: bool=True, language: str="") -> str: :param content: The string to preformatted. :param escape: True if you need to escape special characters. """ - return '
{}
'.format(language, escape_html(content) if escape else content) \ No newline at end of file + return '
{}
'.format(language, escape_html(content) if escape else content) + + +def hide_link(url: str) -> str: + """ + Hide url of an image. + + :param url: + :return: str + """ + return f'' \ No newline at end of file