class

Tourmaline::User

Inherits JSON::Serializable < Reference < Object

This object represents a Telegram user or bot.

Constructors

new(id : Int32 | Int64, is_bot : Bool, first_name : String, last_name : String | Nil = nil, username : String | Nil = nil, language_code : String | Nil = nil, is_premium : Bool | Nil = nil, added_to_attachment_menu : Bool | Nil = nil, can_join_groups : Bool | Nil = nil, can_read_all_group_messages : Bool | Nil = nil, supports_inline_queries : Bool | Nil = nil, can_connect_to_business : Bool | Nil = nil, has_main_web_app : Bool | Nil = nil, has_topics_enabled : Bool | Nil = nil, allows_users_to_create_topics : Bool | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

added_to_attachment_menu=(added_to_attachment_menu : Bool | Nil)

Optional. True, if this user added the bot to the attachment menu

Source
added_to_attachment_menu?

Optional. True, if this user added the bot to the attachment menu

Source
allows_users_to_create_topics=(allows_users_to_create_topics : Bool | Nil)

Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.

Source
allows_users_to_create_topics?

Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.

Source
can_connect_to_business=(can_connect_to_business : Bool | Nil)

Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.

Source
can_connect_to_business?

Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.

Source
can_join_groups=(can_join_groups : Bool | Nil)

Optional. True, if the bot can be invited to groups. Returned only in getMe.

Source
can_join_groups?

Optional. True, if the bot can be invited to groups. Returned only in getMe.

Source
can_read_all_group_messages=(can_read_all_group_messages : Bool | Nil)

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

Source
can_read_all_group_messages?

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

Source
first_name

User's or bot's first name

Source
first_name=(first_name : String)

User's or bot's first name

Source
full_name
Source
has_main_web_app=(has_main_web_app : Bool | Nil)

Optional. True, if the bot has a main Web App. Returned only in getMe.

Source
has_main_web_app?

Optional. True, if the bot has a main Web App. Returned only in getMe.

Source
has_topics_enabled=(has_topics_enabled : Bool | Nil)

Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.

Source
has_topics_enabled?

Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.

Source
id

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

Source
id=(id : Int32 | Int64)

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

Source
inline_mention(name)
Source
is_bot=(is_bot : Bool)

True, if this user is a bot

Source
is_bot?

True, if this user is a bot

Source
is_premium=(is_premium : Bool | Nil)

Optional. True, if this user is a Telegram Premium user

Source
is_premium?

Optional. True, if this user is a Telegram Premium user

Source
language_code

Optional. IETF language tag of the user's language

Source
language_code=(language_code : String | Nil)

Optional. IETF language tag of the user's language

Source
last_name

Optional. User's or bot's last name

Source
last_name=(last_name : String | Nil)

Optional. User's or bot's last name

Source
supports_inline_queries=(supports_inline_queries : Bool | Nil)

Optional. True, if the bot supports inline queries. Returned only in getMe.

Source
supports_inline_queries?

Optional. True, if the bot supports inline queries. Returned only in getMe.

Source
username

Optional. User's or bot's username

Source
username=(username : String | Nil)

Optional. User's or bot's username

Source