class Hamilton::Types::User

Overview

This object represents a Telegram user or bot.

Included Modules

Defined in:

types/user.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def added_to_attachment_menu : Bool | Nil #

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


def added_to_attachment_menu=(added_to_attachment_menu : Bool | Nil) #

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


def can_connect_to_business : Bool | Nil #

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


def can_connect_to_business=(can_connect_to_business : Bool | Nil) #

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


def can_join_groups : Bool | Nil #

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


def can_join_groups=(can_join_groups : Bool | Nil) #

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


def can_read_all_group_messages : Bool | Nil #

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


def can_read_all_group_messages=(can_read_all_group_messages : Bool | Nil) #

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


def first_name : String #

User's or bot's first name.


def first_name=(first_name : String) #

User's or bot's first name.


def has_main_web_app : Bool | Nil #

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


def has_main_web_app=(has_main_web_app : Bool | Nil) #

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


def id : Int64 #

Unique identifier for this user or bot.


def id=(id : Int64) #

Unique identifier for this user or bot.


def is_bot : Bool #

True, if this user is a bot.


def is_bot=(is_bot : Bool) #

True, if this user is a bot.


def is_premium : Bool | Nil #

True, if this user is a Telegram Premium user.


def is_premium=(is_premium : Bool | Nil) #

True, if this user is a Telegram Premium user.


def language_code : String | Nil #

IETF language tag of the user's language.


def language_code=(language_code : String | Nil) #

IETF language tag of the user's language.


def last_name : String | Nil #

User's or bot's last name.


def last_name=(last_name : String | Nil) #

User's or bot's last name.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def supports_inline_queries : Bool | Nil #

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


def supports_inline_queries=(supports_inline_queries : Bool | Nil) #

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


def username : String | Nil #

User's or bot's username.


def username=(username : String | Nil) #

User's or bot's username.