class Tourmaline::Chat
- Tourmaline::Chat
- Reference
- Object
Overview
This object represents a chat.
Included Modules
- JSON::Serializable
Defined in:
tourmaline/types/api.crtourmaline/types/custom/chat.cr
Constructors
- .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, photo : Tourmaline::ChatPhoto | Nil = nil, active_usernames : Array(String) = [] of String, available_reactions : Array(Tourmaline::ReactionType) = [] of Tourmaline::ReactionType, accent_color_id : Int32 | Int64 | Nil = nil, background_custom_emoji_id : String | Nil = nil, profile_accent_color_id : Int32 | Int64 | Nil = nil, profile_background_custom_emoji_id : String | Nil = nil, emoji_status_custom_emoji_id : String | Nil = nil, emoji_status_expiration_date : Int32 | Int64 | Nil = nil, bio : String | Nil = nil, has_private_forwards : Bool | Nil = nil, has_restricted_voice_and_video_messages : Bool | Nil = nil, join_to_send_messages : Bool | Nil = nil, join_by_request : Bool | Nil = nil, description : String | Nil = nil, invite_link : String | Nil = nil, pinned_message : Tourmaline::Message | Nil = nil, permissions : Tourmaline::ChatPermissions | Nil = nil, slow_mode_delay : Int32 | Int64 | Nil = nil, message_auto_delete_time : Int32 | Int64 | Nil = nil, has_aggressive_anti_spam_enabled : Bool | Nil = nil, has_hidden_members : Bool | Nil = nil, has_protected_content : Bool | Nil = nil, has_visible_history : Bool | Nil = nil, sticker_set_name : String | Nil = nil, can_set_sticker_set : Bool | Nil = nil, linked_chat_id : Int32 | Int64 | Nil = nil, location : Tourmaline::ChatLocation | Nil = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#accent_color_id : Int32 | Int64 | Nil
Optional.
-
#accent_color_id=(accent_color_id : Int32 | Int64 | Nil)
Optional.
-
#active_usernames : Array(String)
Optional.
-
#active_usernames=(active_usernames : Array(String))
Optional.
-
#available_reactions : Array(Tourmaline::ReactionType)
Optional.
-
#available_reactions=(available_reactions : Array(Tourmaline::ReactionType))
Optional.
-
#background_custom_emoji_id : String | Nil
Optional.
-
#background_custom_emoji_id=(background_custom_emoji_id : String | Nil)
Optional.
-
#bio : String | Nil
Optional.
-
#bio=(bio : String | Nil)
Optional.
-
#can_set_sticker_set=(can_set_sticker_set : Bool | Nil)
Optional.
-
#can_set_sticker_set? : Bool | Nil
Optional.
- #channel?
-
#description : String | Nil
Optional.
-
#description=(description : String | Nil)
Optional.
-
#emoji_status_custom_emoji_id : String | Nil
Optional.
-
#emoji_status_custom_emoji_id=(emoji_status_custom_emoji_id : String | Nil)
Optional.
- #emoji_status_expiration_date : Time | Nil
- #emoji_status_expiration_date=(emoji_status_expiration_date : Time | Nil)
-
#first_name : String | Nil
Optional.
-
#first_name=(first_name : String | Nil)
Optional.
- #group?
-
#has_aggressive_anti_spam_enabled=(has_aggressive_anti_spam_enabled : Bool | Nil)
Optional.
-
#has_aggressive_anti_spam_enabled? : Bool | Nil
Optional.
-
#has_hidden_members=(has_hidden_members : Bool | Nil)
Optional.
-
#has_hidden_members? : Bool | Nil
Optional.
-
#has_private_forwards=(has_private_forwards : Bool | Nil)
Optional.
-
#has_private_forwards? : Bool | Nil
Optional.
-
#has_protected_content=(has_protected_content : Bool | Nil)
Optional.
-
#has_protected_content? : Bool | Nil
Optional.
-
#has_restricted_voice_and_video_messages=(has_restricted_voice_and_video_messages : Bool | Nil)
Optional.
-
#has_restricted_voice_and_video_messages? : Bool | Nil
Optional.
-
#has_visible_history=(has_visible_history : Bool | Nil)
Optional.
-
#has_visible_history? : Bool | Nil
Optional.
-
#id : Int32 | Int64
Unique identifier for this chat.
-
#id=(id : Int32 | Int64)
Unique identifier for this chat.
-
#invite_link : String | Nil
Optional.
-
#invite_link=(invite_link : String | Nil)
Optional.
-
#is_forum=(is_forum : Bool | Nil)
Optional.
-
#is_forum? : Bool | Nil
Optional.
-
#join_by_request=(join_by_request : Bool | Nil)
Optional.
-
#join_by_request? : Bool | Nil
Optional.
-
#join_to_send_messages=(join_to_send_messages : Bool | Nil)
Optional.
-
#join_to_send_messages? : Bool | Nil
Optional.
-
#last_name : String | Nil
Optional.
-
#last_name=(last_name : String | Nil)
Optional.
-
#linked_chat_id : Int32 | Int64 | Nil
Optional.
-
#linked_chat_id=(linked_chat_id : Int32 | Int64 | Nil)
Optional.
-
#location : Tourmaline::ChatLocation | Nil
Optional.
-
#location=(location : Tourmaline::ChatLocation | Nil)
Optional.
- #message_auto_delete_time : Time | Nil
- #message_auto_delete_time=(message_auto_delete_time : Time | Nil)
- #name
-
#permissions : Tourmaline::ChatPermissions | Nil
Optional.
-
#permissions=(permissions : Tourmaline::ChatPermissions | Nil)
Optional.
-
#photo : Tourmaline::ChatPhoto | Nil
Optional.
-
#photo=(photo : Tourmaline::ChatPhoto | Nil)
Optional.
-
#pinned_message : Tourmaline::Message | Nil
Optional.
-
#pinned_message=(pinned_message : Tourmaline::Message | Nil)
Optional.
- #private?
-
#profile_accent_color_id : Int32 | Int64 | Nil
Optional.
-
#profile_accent_color_id=(profile_accent_color_id : Int32 | Int64 | Nil)
Optional.
-
#profile_background_custom_emoji_id : String | Nil
Optional.
-
#profile_background_custom_emoji_id=(profile_background_custom_emoji_id : String | Nil)
Optional.
-
#slow_mode_delay : Int32 | Int64 | Nil
Optional.
-
#slow_mode_delay=(slow_mode_delay : Int32 | Int64 | Nil)
Optional.
-
#sticker_set_name : String | Nil
Optional.
-
#sticker_set_name=(sticker_set_name : String | Nil)
Optional.
- #supergroup?
-
#title : String | Nil
Optional.
-
#title=(title : String | Nil)
Optional.
-
#type : String
Type of chat, can be either "private", "group", "supergroup" or "channel"
-
#type=(type : String)
Type of chat, can be either "private", "group", "supergroup" or "channel"
-
#username : String | Nil
Optional.
-
#username=(username : String | Nil)
Optional.
Constructor Detail
Instance Method Detail
Optional. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.
Optional. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.
Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.
Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.
Optional. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.
Optional. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.
Optional. Bio of the other party in a private chat. Returned only in getChat.
Optional. Bio of the other party in a private chat. Returned only in getChat.
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.
Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.
Optional. First name of the other party in a private chat
Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.
Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.
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.
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.
Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
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.
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.
Optional. True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.
Optional. True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.
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.
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.
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
Optional. True, if the supergroup chat is a forum (has topics enabled)
Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
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.
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.
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
Optional. The most recent pinned message (by sending date). Returned only in getChat.
Optional. The most recent pinned message (by sending date). Returned only in getChat.
Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.
Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.
Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.
Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
Optional. For supergroups, name of group sticker set. Returned only in getChat.
Optional. For supergroups, name of group sticker set. Returned only in getChat.
Type of chat, can be either "private", "group", "supergroup" or "channel"
Optional. Username, for private chats, supergroups and channels if available
Optional. Username, for private chats, supergroups and channels if available