class Tourmaline::Chat

Overview

This object represents a chat.

Included Modules

Defined in:

tourmaline/types/api.cr
tourmaline/types/custom/chat.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : Int32 | Int64, type : String, title : String | Nil = nil, username : String | Nil = nil, first_name : String | Nil = nil, last_name : String | Nil = nil, is_forum : Bool | Nil = nil) #

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

[View source]

Instance Method Detail

def channel? #

[View source]
def first_name : String | Nil #

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


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

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


[View source]
def group? #

[View source]
def 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]
def 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]
def is_forum=(is_forum : Bool | Nil) #

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


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

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


[View source]
def last_name : String | Nil #

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


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

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


[View source]
def name #

[View source]
def private? #

[View source]
def supergroup? #

[View source]
def title : String | Nil #

Optional. Title, for supergroups, channels and group chats


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

Optional. Title, for supergroups, channels and group chats


[View source]
def type : String #

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


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

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


[View source]
def username : String | Nil #

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


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

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


[View source]