telegram.utils.helpers Module

This module contains helper functions.

telegram.utils.helpers.escape_markdown(text)

Helper function to escape telegram markup symbols.

telegram.utils.helpers.from_timestamp(unixtime)
Parameters:unixtime (int) –
Returns:
Return type:datetime.datetime
telegram.utils.helpers.mention_html(user_id, name)
Parameters:
  • user_id (int) –
  • name (str) –
Returns:

The inline mention for the user as html.

Return type:

str

telegram.utils.helpers.mention_markdown(user_id, name)
Parameters:
  • user_id (int) –
  • name (str) –
Returns:

The inline mention for the user as markdown.

Return type:

str

telegram.utils.helpers.to_timestamp(dt_obj)
Parameters:dt_obj (datetime.datetime) –
Returns:
Return type:int