Trait

com.bot4s.telegram.api.declarative

Messages

Related Doc: package declarative

Permalink

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

Declarative helpers for processing incoming messages.

Linear Supertypes
BotBase[F], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Messages
  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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  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 equals(arg0: Any): Boolean

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def onEditedMessage(action: Action[F, Message]): Unit

    Permalink

    Executes action for every incoming edited message event.

  17. def onExtMessage(action: Action[F, (Message, Option[User])]): Unit

    Permalink
  18. def onMessage(action: Action[F, Message]): Unit

    Permalink

    Executes action for every incoming message.

  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
    BotBase
  22. def receiveEditedChannelPost(message: Message): F[Unit]

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

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

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

    Permalink
    Definition Classes
    BotBase
  26. def receiveMessage(msg: Message): F[Unit]

    Permalink
    Definition Classes
    MessagesBotBase
  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 reply(text: String, parseMode: Option[ParseMode] = None, disableWebPagePreview: Option[Boolean] = None, disableNotification: Option[Boolean] = None, replyToMessageId: Option[Int] = None, replyMarkup: Option[ReplyMarkup] = None)(implicit message: Message): F[Message]

    Permalink

    Sends text replies.

    Sends text replies. Supports Markdown/HTML formatting and markups.

    Note:

    Only the tags mentioned above are currently supported. Tags must not be nested. All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with <, > with > and & with &). All numerical HTML entities are supported. The API currently supports only the following named HTML entities: <, >, & and ".

    text

    Text of the message to be sent

    parseMode

    Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.

    disableWebPagePreview

    Optional Disables link previews for links in this message

    disableNotification

    Optional Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.

    replyToMessageId

    Optional If the message is a reply, ID of the original message

    replyMarkup

    com.bot4s.telegram.models.InlineKeyboardMarkup or com.bot4s.telegram.models.ReplyKeyboardMarkup or com.bot4s.telegram.models.ReplyKeyboardRemove or com.bot4s.telegram.models.ForceReply Optional Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user.

  31. def replyMd(text: String, disableWebPagePreview: Option[Boolean] = None, disableNotification: Option[Boolean] = None, replyToMessageId: Option[Int] = None, replyMarkup: Option[ReplyMarkup] = None)(implicit message: Message): F[Message]

    Permalink

    Sends text replies in Markdown format.

    Sends text replies in Markdown format.

    text

    Text of the message to be sent

    disableWebPagePreview

    Optional Disables link previews for links in this message

    disableNotification

    Optional Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.

    replyToMessageId

    Optional If the message is a reply, ID of the original message

    replyMarkup

    models.InlineKeyboardMarkup or models.ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply Optional Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user.

  32. def request: RequestHandler[F]

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    BotBase
  38. def using[T](extractor: Extractor[Message, T])(actionT: Action[F, T])(implicit msg: Message): F[Unit]

    Permalink

    Generic extractor for messages.

    Generic extractor for messages.

    Example:
    1. onCommand('hello) { implicit msg =>
        using(_.from) {
          user =>
            reply(s"Hello ${user.firstName}!")
        }
      }
  39. final def wait(): Unit

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

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

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

Inherited from BotBase[F]

Inherited from AnyRef

Inherited from Any

Ungrouped