diff --git a/botogram/objects/chats.py b/botogram/objects/chats.py index 38f4556..5046786 100644 --- a/botogram/objects/chats.py +++ b/botogram/objects/chats.py @@ -41,7 +41,11 @@ class User(BaseObject, mixins.ChatMixin): optional = { "last_name": str, "username": str, - "is_bot": bool + "language_code": str, + "is_bot": bool, + } + replace_keys = { + "language_code": "lang", } _check_equality_ = "id" diff --git a/docs/api/telegram.rst b/docs/api/telegram.rst index 1bc5535..61673d1 100644 --- a/docs/api/telegram.rst +++ b/docs/api/telegram.rst @@ -61,6 +61,14 @@ about its business. *This attribute can be None if it's not provided by Telegram.* + .. py:attribute:: lang + + The user's language, given by Telegram. + + *This attribute can be None if it's not provided by Telegram* + + .. versionadded:: 0.6 + .. py:attribute:: name The computed name of the user. If someone has only the first name, this