Package

com.bot4s.telegram.api

declarative

Permalink

package declarative

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. declarative
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Action[F[_], T] = (T) ⇒ F[Unit]

    Permalink
  2. type ActionWithArgs[F[_], T] = (T) ⇒ (Args) ⇒ F[Unit]

    Permalink
  3. type Args = Seq[String]

    Permalink
  4. trait Callbacks[F[_]] extends BotBase[F]

    Permalink

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

  5. trait ChannelPosts[F[_]] extends BotBase[F]

    Permalink

    Declarative helpers for processing channel posts.

  6. case class Command(cmd: String, recipient: Option[String]) extends Product with Serializable

    Permalink
  7. trait CommandFilterMagnet extends AnyRef

    Permalink
  8. trait CommandImplicits extends AnyRef

    Permalink
  9. trait Commands[F[_]] extends Messages[F] with CommandImplicits

    Permalink

    Provides a declarative interface to define commands.

  10. trait Declarative[F[_]] extends Updates[F] with Messages[F] with ChannelPosts[F] with Callbacks[F] with InlineQueries[F] with Payments[F]

    Permalink

    Declarative interface.

  11. type Extractor[T, R] = (T) ⇒ Option[R]

    Permalink
  12. type Filter[T] = (T) ⇒ Boolean

    Permalink
  13. trait InlineQueries[F[_]] extends BotBase[F]

    Permalink

    Declarative interface for processing inline queries.

  14. trait Messages[F[_]] extends BotBase[F]

    Permalink

    Declarative helpers for processing incoming messages.

  15. trait Payments[F[_]] extends BotBase[F]

    Permalink

    Declarative interface for processing payments.

    Declarative interface for processing payments. See https://core.telegram.org/bots/payments.

  16. trait RegexCommands[F[_]] extends Messages[F] with InlineQueries[F]

    Permalink

    Regex-based commands an inline queries.

  17. trait Updates[F[_]] extends BotBase[F]

    Permalink

    Declarative helpers for processing updates.

Value Members

  1. object CommandFilterMagnet

    Permalink
  2. def when[F[_], T](actionInstaller: (Action[F, T]) ⇒ Unit, filter: Filter[T])(action: Action[F, T])(implicit arg0: Applicative[F]): Unit

    Permalink

    Adds a filter to an action handler.

    Adds a filter to an action handler.

    when(onCommand('secret), isSenderAuthenticated) {
      implicit msg =>
        reply("42")
    }
    actionInstaller

    e.g onMessage, onCommand('hello)

    action

    Action executed if the filter pass.

  3. def whenOrElse[F[_], T](actionInstaller: (Action[F, T]) ⇒ Unit, filter: Filter[T])(action: Action[F, T])(elseAction: Action[F, T]): Unit

    Permalink

    Adds a filter to an action handler; including a fallback action.

    Adds a filter to an action handler; including a fallback action.

    whenOrElse(onCommand('secret), isSenderAuthenticated) {
      implicit msg =>
        reply("42")
    } /* or else */ {
      reply("You must /login first")(_)
    }
    actionInstaller

    e.g onMessage, onCommand('hello)

    action

    Action executed if the filter pass.

    elseAction

    Action executed if the filter does not pass.

Inherited from AnyRef

Inherited from Any

Ungrouped