MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / mention_html

Method mention_html

src/telegram/_user.py:348–359  ·  view source on GitHub ↗

Args: name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`. Returns: :obj:`str`: The inline mention for the user as HTML.

(self, name: str | None = None)

Source from the content-addressed store, hash-verified

346 return helpers_mention_markdown(self.id, self.full_name, version=2)
347
348 def mention_html(self, name: str | None = None) -> str:
349 """
350 Args:
351 name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`.
352
353 Returns:
354 :obj:`str`: The inline mention for the user as HTML.
355
356 """
357 if name:
358 return helpers_mention_html(self.id, name)
359 return helpers_mention_html(self.id, self.full_name)
360
361 def mention_button(self, name: str | None = None) -> InlineKeyboardButton:
362 """Shortcut for::

Callers 10

test_mention_htmlMethod · 0.45
test_mention_htmlMethod · 0.45
test_mention_htmlMethod · 0.45
startFunction · 0.45
receive_poll_answerFunction · 0.45
greet_chat_membersFunction · 0.45
webhook_updateFunction · 0.45
webhook_updateFunction · 0.45
webhook_updateFunction · 0.45
webhook_updateFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_mention_htmlMethod · 0.36
test_mention_htmlMethod · 0.36
test_mention_htmlMethod · 0.36