class

Tourmaline::Chat

Inherits JSON::Serializable / Reference / Object

This object represents a chat.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

active_usernames

Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.

Source
active_usernames=(active_usernames : Array(String))

Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.

Source
bio

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

Source
bio=(bio : String | Nil)

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

Source
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.

Source
can_set_sticker_set?

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

Source
channel?
Source
description

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

Source
description=(description : String | Nil)

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

Source
emoji_status_custom_emoji_id

Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.

Source
emoji_status_custom_emoji_id=(emoji_status_custom_emoji_id : String | Nil)

Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.

Source
first_name

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

Source
first_name=(first_name : String | Nil)

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

Source
group?
Source
has_aggressive_anti_spam_enabled=(has_aggressive_anti_spam_enabled : Bool | Nil)

Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.

Source
has_aggressive_anti_spam_enabled?

Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.

Source
has_hidden_members=(has_hidden_members : Bool | Nil)

Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.

Source
has_hidden_members?

Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.

Source
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.

Source
has_private_forwards?

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.

Source
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.

Source
has_protected_content?

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

Source
has_restricted_voice_and_video_messages=(has_restricted_voice_and_video_messages : Bool | Nil)

Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.

Source
has_restricted_voice_and_video_messages?

Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.

Source
id

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.

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.

Source
is_forum=(is_forum : Bool | Nil)

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

Source
is_forum?

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

Source
join_by_request=(join_by_request : Bool | Nil)

Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.

Source
join_by_request?

Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.

Source
join_to_send_messages=(join_to_send_messages : Bool | Nil)

Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.

Source
join_to_send_messages?

Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.

Source
last_name

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

Source
last_name=(last_name : String | Nil)

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

Source
linked_chat_id

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.

Source
linked_chat_id=(linked_chat_id : Int32 | Int64 | 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.

Source
location

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

Source
location=(location : Tourmaline::ChatLocation | Nil)

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

Source
message_auto_delete_time

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

Source
message_auto_delete_time=(message_auto_delete_time : Time | Nil)

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

Source
name
Source
permissions

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

Source
permissions=(permissions : Tourmaline::ChatPermissions | Nil)

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

Source
photo

Optional. Chat photo. Returned only in getChat.

Source
photo=(photo : Tourmaline::ChatPhoto | Nil)

Optional. Chat photo. Returned only in getChat.

Source
pinned_message

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

Source
pinned_message=(pinned_message : Tourmaline::Message | Nil)

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

Source
private?
Source
slow_mode_delay

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

Source
slow_mode_delay=(slow_mode_delay : Int32 | Int64 | Nil)

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

Source
sticker_set_name

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

Source
sticker_set_name=(sticker_set_name : String | Nil)

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

Source
supergroup?
Source
title

Optional. Title, for supergroups, channels and group chats

Source
title=(title : String | Nil)

Optional. Title, for supergroups, channels and group chats

Source
type

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

Source
type=(type : String)

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

Source
username

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

Source
username=(username : String | Nil)

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

Source

Nested types