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)
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
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
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