Trait

com.bot4s.telegram.api.declarative

InlineQueries

Related Doc: package declarative

Permalink

trait InlineQueries[F[_]] extends BotBase[F]

Declarative interface for processing inline queries.

Linear Supertypes
BotBase[F], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InlineQueries
  2. BotBase
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val client: RequestHandler[F]

    Permalink
    Definition Classes
    BotBase
  2. implicit abstract val monad: MonadError[F, Throwable]

    Permalink
    Definition Classes
    BotBase

Concrete 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. def allowedUpdates: Option[Seq[UpdateType]]

    Permalink

    Allowed updates.

    Allowed updates. See UpdateType.Filters. By default all updates are allowed.

    returns

    Allowed updates. None indicates no-filtering (all updates allowed).

    import UpdateType.Filters._
    override def allowedUpdates: Option[Seq[UpdateType]] =
      Some(MessageUpdates ++ InlineUpdates)
    Definition Classes
    BotBase
  5. def answerInlineQuery(results: Seq[InlineQueryResult], cacheTime: Option[Int] = None, isPersonal: Option[Boolean] = None, nextOffset: Option[String] = None, switchPmText: Option[String] = None, switchPmParameter: Option[String] = None)(implicit inlineQuery: InlineQuery): F[Boolean]

    Permalink

    Use this method to send answers to an inline query.

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

    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.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  17. def onChosenInlineResult(action: Action[F, ChosenInlineResult]): Unit

    Permalink

    Executes 'action' for every inline result.

    Executes 'action' for every inline result. * See https://core.telegram.org/bots/inline#collecting-feedback

  18. def onInlineQuery(action: Action[F, InlineQuery]): Unit

    Permalink

    Executes 'action' for every inline query.

  19. def receiveCallbackQuery(callbackQuery: CallbackQuery): F[Unit]

    Permalink
    Definition Classes
    BotBase
  20. def receiveChannelPost(message: Message): F[Unit]

    Permalink
    Definition Classes
    BotBase
  21. def receiveChosenInlineResult(chosenInlineResult: ChosenInlineResult): F[Unit]

    Permalink
    Definition Classes
    InlineQueriesBotBase
  22. def receiveEditedChannelPost(message: Message): F[Unit]

    Permalink
    Definition Classes
    BotBase
  23. def receiveEditedMessage(editedMessage: Message): F[Unit]

    Permalink
    Definition Classes
    BotBase
  24. def receiveExtMessage(extMessage: (Message, Option[User])): F[Unit]

    Permalink
    Definition Classes
    BotBase
  25. def receiveInlineQuery(inlineQuery: InlineQuery): F[Unit]

    Permalink
    Definition Classes
    InlineQueriesBotBase
  26. def receiveMessage(message: Message): F[Unit]

    Permalink
    Definition Classes
    BotBase
  27. def receivePreCheckoutQuery(preCheckoutQuery: PreCheckoutQuery): F[Unit]

    Permalink
    Definition Classes
    BotBase
  28. def receiveShippingQuery(shippingQuery: ShippingQuery): F[Unit]

    Permalink
    Definition Classes
    BotBase
  29. def receiveUpdate(u: Update, botUser: Option[User]): F[Unit]

    Permalink

    Dispatch updates to specialized handlers.

    Dispatch updates to specialized handlers. Incoming update can be a message, edited message, channel post, edited channel post, inline query, inline query results (sample), callback query, shipping or pre-checkout events.

    u

    Incoming update.

    Definition Classes
    BotBase
  30. def request: RequestHandler[F]

    Permalink
    Definition Classes
    BotBase
  31. def run(): F[Unit]

    Permalink
    Definition Classes
    BotBase
  32. def shutdown(): Unit

    Permalink
    Definition Classes
    BotBase
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. lazy val unit: F[Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    BotBase
  36. final def wait(): Unit

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

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

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

Inherited from BotBase[F]

Inherited from AnyRef

Inherited from Any

Ungrouped