class Hamilton::Types::InlineQuery

Overview

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

Included Modules

Defined in:

types/inline_query.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def chat_type : String | Nil #

Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat.


def chat_type=(chat_type : String | Nil) #

Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat.


Sender.


def from=(from : Hamilton::Types::User) #

Sender.


def id : String #

Unique identifier for this query.


def id=(id : String) #

Unique identifier for this query.


def location : Hamilton::Types::Location | Nil #

Sender location, only for bots that request user location.


def location=(location : Hamilton::Types::Location | Nil) #

Sender location, only for bots that request user location.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def offset : String #

Offset of the results to be returned, can be controlled by the bot.


def offset=(offset : String) #

Offset of the results to be returned, can be controlled by the bot.


def query : String #

Text of the query (up to 256 characters).


def query=(query : String) #

Text of the query (up to 256 characters).