Skip to content

class Tourmaline::Chat
inherits Reference #

This object represents a chat.

Included modules

JSON::Serializable

Constructors#

.new(id, type, title : String? = nil, username : String? = nil, first_name : String? = nil, last_name : String? = nil, is_forum : Bool? = nil) #

View source

.new(pull : JSON::PullParser) #

View source

Methods#

#channel? #

View source

#first_name : String? #

Optional. First name of the other party in a private chat

View source

#first_name=(first_name : String?) #

Optional. First name of the other party in a private chat

View source

#group? #

View source

#id : Int32 | Int64 #

Unique identifier for this chat. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#id=(id : Int32 | Int64) #

Unique identifier for this chat. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#is_forum=(is_forum : Bool?) #

Optional. True, if the supergroup chat is a forum (has topics enabled)

View source

#is_forum? : Bool? #

Optional. True, if the supergroup chat is a forum (has topics enabled)

View source

#last_name : String? #

Optional. Last name of the other party in a private chat

View source

#last_name=(last_name : String?) #

Optional. Last name of the other party in a private chat

View source

#name #

View source

#private? #

View source

#supergroup? #

View source

#title : String? #

Optional. Title, for supergroups, channels and group chats

View source

#title=(title : String?) #

Optional. Title, for supergroups, channels and group chats

View source

#type : String #

Type of the chat, can be either "private", "group", "supergroup" or "channel"

View source

#type=(type : String) #

Type of the chat, can be either "private", "group", "supergroup" or "channel"

View source

#username : String? #

Optional. Username, for private chats, supergroups and channels if available

View source

#username=(username : String?) #

Optional. Username, for private chats, supergroups and channels if available

View source