class InlineQuery

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

Public Instance Methods

from() click to toggle source

Sender. User object

# File lib/objects/inline_query.rb, line 21
def from
  User.new(@query.from)
end
id() click to toggle source

Unique identifier for this query

# File lib/objects/inline_query.rb, line 15
def id
  @query.id
end
location() click to toggle source

Optional. Sender location, only for bots that request user location,

# File lib/objects/inline_query.rb, line 26
def location
  lcation = @query.location
  return Location.new(lcation) if lcation

  false
end
offset() click to toggle source

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

# File lib/objects/inline_query.rb, line 39
def offset
  @query.offset
end
query() click to toggle source

Text of the query (up to 256 characters)

# File lib/objects/inline_query.rb, line 34
def query
  @query.query
end