Class

com.bot4s.telegram.methods

AnswerInlineQuery

Related Doc: package methods

Permalink

case class AnswerInlineQuery(inlineQueryId: String, results: Seq[InlineQueryResult], cacheTime: Option[Int] = None, isPersonal: Option[Boolean] = None, nextOffset: Option[String] = None, switchPmText: Option[String] = None, switchPmParameter: Option[String] = None) extends JsonRequest[Boolean] with Product with Serializable

Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.

inlineQueryId

String Unique identifier for the answered query

results

Array of InlineQueryResult A JSON-serialized array of results for the inline query

cacheTime

Integer Optional The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.

isPersonal

Boolean Optional Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query

nextOffset

String Optional Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.

switchPmText

String Optional If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter

switchPmParameter

String Optional Parameter for the start message sent to the bot when user presses the switch buttonExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.

Linear Supertypes
Serializable, Serializable, Product, Equals, JsonRequest[Boolean], Request[Boolean], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AnswerInlineQuery
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. JsonRequest
  7. Request
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AnswerInlineQuery(inlineQueryId: String, results: Seq[InlineQueryResult], cacheTime: Option[Int] = None, isPersonal: Option[Boolean] = None, nextOffset: Option[String] = None, switchPmText: Option[String] = None, switchPmParameter: Option[String] = None)

    Permalink

    inlineQueryId

    String Unique identifier for the answered query

    results

    Array of InlineQueryResult A JSON-serialized array of results for the inline query

    cacheTime

    Integer Optional The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.

    isPersonal

    Boolean Optional Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query

    nextOffset

    String Optional Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.

    switchPmText

    String Optional If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter

    switchPmParameter

    String Optional Parameter for the start message sent to the bot when user presses the switch buttonExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val cacheTime: Option[Int]

    Permalink

    Integer Optional The maximum amount of time in seconds that the result of the inline query may be cached on the server.

    Integer Optional The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. val inlineQueryId: String

    Permalink

    String Unique identifier for the answered query

  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val isPersonal: Option[Boolean]

    Permalink

    Boolean Optional Pass True, if results may be cached on the server side only for the user that sent the query.

    Boolean Optional Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query

  13. def methodName: String

    Permalink

    Extract request URL from class name.

    Extract request URL from class name.

    Definition Classes
    Request
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. val nextOffset: Option[String]

    Permalink

    String Optional Pass the offset that a client should send in the next query with the same text to receive more results.

    String Optional Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.

  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val results: Seq[InlineQueryResult]

    Permalink

    Array of InlineQueryResult A JSON-serialized array of results for the inline query

  19. val switchPmParameter: Option[String]

    Permalink

    String Optional Parameter for the start message sent to the bot when user presses the switch buttonExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly.

    String Optional Parameter for the start message sent to the bot when user presses the switch buttonExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.

  20. val switchPmText: Option[String]

    Permalink

    String Optional If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from JsonRequest[Boolean]

Inherited from Request[Boolean]

Inherited from AnyRef

Inherited from Any

Ungrouped