class Tourmaline::KeyboardButtonRequestChat

Overview

This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(request_id : Int32 | Int64, chat_is_channel : Bool, chat_is_forum : Bool | Nil = nil, chat_has_username : Bool | Nil = nil, chat_is_created : Bool | Nil = nil, user_administrator_rights : Tourmaline::ChatAdministratorRights | Nil = nil, bot_administrator_rights : Tourmaline::ChatAdministratorRights | Nil = nil, bot_is_member : Bool | Nil = nil, request_title : Bool | Nil = nil, request_username : Bool | Nil = nil, request_photo : Bool | Nil = nil) #

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

[View source]

Instance Method Detail

def bot_administrator_rights : Tourmaline::ChatAdministratorRights | Nil #

Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.


[View source]
def bot_administrator_rights=(bot_administrator_rights : Tourmaline::ChatAdministratorRights | Nil) #

Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.


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

Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.


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

Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.


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

Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.


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

Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.


[View source]
def chat_is_channel=(chat_is_channel : Bool) #

Pass True to request a channel chat, pass False to request a group or a supergroup chat.


[View source]
def chat_is_channel? : Bool #

Pass True to request a channel chat, pass False to request a group or a supergroup chat.


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

Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.


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

Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.


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

Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.


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

Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.


[View source]
def request_id : Int32 | Int64 #

Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message


[View source]
def request_id=(request_id : Int32 | Int64) #

Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message


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

Optional. Pass True to request the chat's photo


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

Optional. Pass True to request the chat's photo


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

Optional. Pass True to request the chat's title


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

Optional. Pass True to request the chat's title


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

Optional. Pass True to request the chat's username


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

Optional. Pass True to request the chat's username


[View source]
def user_administrator_rights : Tourmaline::ChatAdministratorRights | Nil #

Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.


[View source]
def user_administrator_rights=(user_administrator_rights : Tourmaline::ChatAdministratorRights | Nil) #

Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.


[View source]