# danog\MadelineProto\EventHandler\Message\Rich\Button\SwitchInline: A button that starts an inline query to the bot, in the current chat or in a chat chosen by the user.

[Back to index](../../../../../../index.html)

> Author: Daniil Gentili <daniil@daniil.it>  
  

A button that starts an inline query to the bot, in the current chat or in a chat chosen by the user.  



## Properties
* `$query`: `string` Inline query to insert
* `$currentChat`: `bool` Whether to insert the query in the current chat, instead of a chat chosen by the user
* `$allowUserChats`: `bool` Whether private chats with users can be chosen
* `$allowBotChats`: `bool` Whether private chats with bots can be chosen
* `$allowGroupChats`: `bool` Whether groups and supergroups can be chosen
* `$allowChannelChats`: `bool` Whether channels can be chosen
* `$text`: `danog\MadelineProto\EventHandler\Message\Rich\RichText` Text of the button
* `$style`: `?danog\MadelineProto\EventHandler\Message\Rich\ButtonStyle` Style of the button, null for the default one

## Method list:
* [`__construct(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text, string $query, bool $currentChat = false, bool $allowUserChats = true, bool $allowBotChats = true, bool $allowGroupChats = true, bool $allowChannelChats = true, ?\danog\MadelineProto\EventHandler\Message\Rich\ButtonStyle $style = NULL)`](#__construct)

## Methods:
### <a name="__construct"></a> `__construct(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text, string $query, bool $currentChat = false, bool $allowUserChats = true, bool $allowBotChats = true, bool $allowGroupChats = true, bool $allowChannelChats = true, ?\danog\MadelineProto\EventHandler\Message\Rich\ButtonStyle $style = NULL)`




Parameters:

* `$text`: `\danog\MadelineProto\EventHandler\Message\Rich\RichText|string`   
* `$query`: `string`   
* `$currentChat`: `bool`   
* `$allowUserChats`: `bool`   
* `$allowBotChats`: `bool`   
* `$allowGroupChats`: `bool`   
* `$allowChannelChats`: `bool`   
* `$style`: `?\danog\MadelineProto\EventHandler\Message\Rich\ButtonStyle`   


#### See also: 
* [`\danog\MadelineProto\EventHandler\Message\Rich\RichText`: Styled text of a [rich message](https://core.telegram.org/bots/api#richtext): a tree of plain texts, styles, links and so on.](../../../../../../danog/MadelineProto/EventHandler/Message/Rich/RichText.html)
* [`\danog\MadelineProto\EventHandler\Message\Rich\ButtonStyle`: Style of a button of a rich message.](../../../../../../danog/MadelineProto/EventHandler/Message/Rich/ButtonStyle.html)




---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
