class Telegram::API::User

Overview

This object represents a Telegram user or bot.

Defined in:

telegram/api/generated/types.cr
telegram/api/overrides/user.cr

Constructors

Instance Method Summary

Instance methods inherited from class Telegram::API::Type

==(other) ==, client client

Constructor methods inherited from class Telegram::API::Type

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(id : Int64, is_bot : Bool, first_name : String, last_name : String | Nil = nil, username : String | Nil = nil, language_code : String | 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) #

This object represents a Telegram user or bot.


[View source]

Instance Method Detail

def add_sticker_to_set(name, png_sticker, emojis, mask_position = nil) #

[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_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_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=(can_read_all_group_messages : Bool | Nil) #

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


[View source]
def create_new_sticker_set(name, title, png_sticker, emojis, **kwargs) #

[View source]
def deleted? #

[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 get_game_high_scores(**kwargs) #

[View source]
def id : 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 : 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(full = false) #

[View source]
def is_bot : Bool #

True, if this user is a bot


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

True, if this user is a bot


[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 profile_photos(offset = nil, limit = nil) #

[View source]
def set_game_score(score, **kwargs) #

[View source]
def supports_inline_queries : Bool | Nil #

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


[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 upload_sticker_file(png_sticker) #

[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]