class Tourmaline::User

Overview

This object represents a Telegram user or bot.

Included Modules

Defined in:

tourmaline/types/api.cr
tourmaline/types/custom/user.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def added_to_attachment_menu=(added_to_attachment_menu : Bool | Nil) #

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


[View source]
def added_to_attachment_menu? : Bool | Nil #

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


[View source]
def can_join_groups=(can_join_groups : Bool | Nil) #

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


[View source]
def can_join_groups? : Bool | Nil #

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


[View source]
def 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.


[View source]
def can_read_all_group_messages? : Bool | Nil #

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


[View source]
def first_name : String #

User's or bot's first name


[View source]
def first_name=(first_name : String) #

User's or bot's first name


[View source]
def full_name #

[View source]
def 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.


[View source]
def 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.


[View source]
def inline_mention(name) #

[View source]
def is_bot=(is_bot : Bool) #

True, if this user is a bot


[View source]
def is_bot? : Bool #

True, if this user is a bot


[View source]
def is_premium=(is_premium : Bool | Nil) #

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


[View source]
def is_premium? : Bool | Nil #

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


[View source]
def language_code : String | Nil #

Optional. IETF language tag of the user's language


[View source]
def language_code=(language_code : String | Nil) #

Optional. IETF language tag of the user's language


[View source]
def last_name : String | Nil #

Optional. User's or bot's last name


[View source]
def last_name=(last_name : String | Nil) #

Optional. User's or bot's last name


[View source]
def supports_inline_queries=(supports_inline_queries : Bool | Nil) #

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


[View source]
def supports_inline_queries? : Bool | Nil #

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


[View source]
def username : String | Nil #

Optional. User's or bot's username


[View source]
def username=(username : String | Nil) #

Optional. User's or bot's username


[View source]