Trait

com.bot4s.telegram.api.declarative

Callbacks

Related Doc: package declarative

Permalink

trait Callbacks[F[_]] extends BotBase[F]

Declarative interface for callbacks; allows filtering callback-query events by tag.

Linear Supertypes
BotBase[F], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Callbacks
  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 ackCallback(text: Option[String] = None, showAlert: Option[Boolean] = None, url: Option[String] = None, cacheTime: Option[Int] = None)(implicit callbackQuery: CallbackQuery): F[Boolean]

    Permalink

    Send a response for a callback query.

    Send a response for a callback query. Callback queries must ack-ed e.g. ackCallback(), even if no response is sent.

    text

    Text of the notification. If not specified, nothing will be shown to the user

    showAlert

    If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.

    url

    URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.

    cacheTime

    The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.

    returns

    A future containing the result of the AnswerCallbackQuery request.

  5. 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
  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 onCallbackQuery(action: Action[F, CallbackQuery]): Unit

    Permalink

    Executes 'action' for every incoming callback query.

  18. def onCallbackWithTag(tag: String)(action: Action[F, CallbackQuery]): Unit

    Permalink

    Filter callbacks based on a tag (to avoid collision).

    Filter callbacks based on a tag (to avoid collision). The tag is stripped from the CallbackQuery object when passed to the handler.

    tag

    Tag

    action

    Handler to process the filtered callback query.

  19. def prefixTag(tag: String)(s: String): String

    Permalink

    Helper to tag 'callbackData' in inline markups.

    Helper to tag 'callbackData' in inline markups. Usage:

    def tag = prefixTag("MY_TAG") _
    
    ... callbackData = tag("some data")
  20. def receiveCallbackQuery(callbackQuery: CallbackQuery): F[Unit]

    Permalink
    Definition Classes
    CallbacksBotBase
  21. def receiveChannelPost(message: Message): F[Unit]

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

    Permalink
    Definition Classes
    BotBase
  23. def receiveEditedChannelPost(message: Message): F[Unit]

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

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

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

    Permalink
    Definition Classes
    BotBase
  27. def receiveMessage(message: Message): F[Unit]

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

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

    Permalink
    Definition Classes
    BotBase
  30. 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
  31. def request: RequestHandler[F]

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

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

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

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

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

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

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

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

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

Inherited from BotBase[F]

Inherited from AnyRef

Inherited from Any

Ungrouped