telegram.user module

This module contains an object that represents a Telegram User.

class telegram.user.User(id, first_name, type=None, last_name=None, username=None, bot=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a Telegram User.

id

int

first_name

str

last_name

str

username

str

type

str

Parameters:
  • id (int) –
  • first_name (str) –
  • **kwargs – Arbitrary keyword arguments.
Keyword Arguments:
 
  • type (Optional[str]) –
  • last_name (Optional[str]) –
  • username (Optional[str]) –
  • bot (Optional[Bot]) – The Bot to use for instance methods
static de_json(data, bot)
Parameters:
Returns:

Return type:

telegram.User

get_profile_photos(*args, **kwargs)

Shortcut for bot.getUserProfilePhotos(update.message.from_user.id, *args, **kwargs)

name

str