class Telegram::API::Chat

Overview

This object represents a chat.

Defined in:

telegram/api/generated/types.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, type : String, title : String | Nil = nil, username : String | Nil = nil, first_name : String | Nil = nil, last_name : String | Nil = nil, photo : ChatPhoto | Nil = nil, bio : String | Nil = nil, has_private_forwards : Bool | Nil = nil, description : String | Nil = nil, invite_link : String | Nil = nil, pinned_message : Message | Nil = nil, permissions : ChatPermissions | Nil = nil, slow_mode_delay : Int32 | Nil = nil, message_auto_delete_time : Int32 | Nil = nil, has_protected_content : Bool | Nil = nil, sticker_set_name : String | Nil = nil, can_set_sticker_set : Bool | Nil = nil, linked_chat_id : Int32 | Nil = nil, location : ChatLocation | Nil = nil) #

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

This object represents a chat.


[View source]

Instance Method Detail

def bio : String | Nil #

Optional. Bio of the other party in a private chat. Returned only in getChat.


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

Optional. Bio of the other party in a private chat. Returned only in getChat.


[View source]
def can_set_sticker_set : Bool | Nil #

Optional. True, if the bot can change the group sticker set. Returned only in getChat.


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

Optional. True, if the bot can change the group sticker set. Returned only in getChat.


[View source]
def description : String | Nil #

Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.


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

Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.


[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 has_private_forwards : Bool | Nil #

Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.


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

Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.


[View source]
def has_protected_content : Bool | Nil #

Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.


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

Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.


[View source]
def id : 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 : 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 invite_link : String | Nil #

Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.


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

Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.


[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 linked_chat_id : Int32 | Nil #

Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.


[View source]
def linked_chat_id=(linked_chat_id : Int32 | Nil) #

Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.


[View source]
def location : ChatLocation | Nil #

Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.


[View source]
def location=(location : ChatLocation | Nil) #

Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.


[View source]
def message_auto_delete_time : Int32 | Nil #

Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.


[View source]
def message_auto_delete_time=(message_auto_delete_time : Int32 | Nil) #

Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.


[View source]
def permissions : ChatPermissions | Nil #

Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.


[View source]
def permissions=(permissions : ChatPermissions | Nil) #

Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.


[View source]
def photo : ChatPhoto | Nil #

Optional. Chat photo. Returned only in getChat.


[View source]
def photo=(photo : ChatPhoto | Nil) #

Optional. Chat photo. Returned only in getChat.


[View source]
def pinned_message : Message | Nil #

Optional. The most recent pinned message (by sending date). Returned only in getChat.


[View source]
def pinned_message=(pinned_message : Message | Nil) #

Optional. The most recent pinned message (by sending date). Returned only in getChat.


[View source]
def slow_mode_delay : Int32 | Nil #

Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.


[View source]
def slow_mode_delay=(slow_mode_delay : Int32 | Nil) #

Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.


[View source]
def sticker_set_name : String | Nil #

Optional. For supergroups, name of group sticker set. Returned only in getChat.


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

Optional. For supergroups, name of group sticker set. Returned only in getChat.


[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 chat, can be either "private", "group", "supergroup" or "channel"


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

Type of 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]