Trait

com.bot4s.telegram.api.declarative

Messages

Related Doc: package declarative

Permalink

trait Messages extends BotBase

Declarative helpers for processing incoming messages.

Linear Supertypes
BotBase, 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

    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. var getMe: User

    Permalink
    Attributes
    protected
    Definition Classes
    BotBase
  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 onEditedMessage(action: Action[Message]): Unit

    Permalink

    Executes action for every incoming edited message event.

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

    Permalink

    Executes action for every incoming message.

  19. def receiveCallbackQuery(callbackQuery: CallbackQuery): Unit

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

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

    Permalink
    Definition Classes
    BotBase
  22. def receiveEditedChannelPost(message: Message): Unit

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

    Permalink
    Definition Classes
    MessagesBotBase
  24. def receiveInlineQuery(inlineQuery: InlineQuery): Unit

    Permalink
    Definition Classes
    BotBase
  25. def receiveMessage(msg: Message): Unit

    Permalink
    Definition Classes
    MessagesBotBase
  26. def receivePreCheckoutQuery(preCheckoutQuery: PreCheckoutQuery): Unit

    Permalink
    Definition Classes
    BotBase
  27. def receiveShippingQuery(shippingQuery: ShippingQuery): Unit

    Permalink
    Definition Classes
    BotBase
  28. def receiveUpdate(u: Update): 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
  29. 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): Future[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.

  30. def replyMd(text: String, disableWebPagePreview: Option[Boolean] = None, disableNotification: Option[Boolean] = None, replyToMessageId: Option[Int] = None, replyMarkup: Option[ReplyMarkup] = None)(implicit message: Message): Future[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.

  31. def request: RequestHandler

    Permalink
    Definition Classes
    BotBase
  32. def run(): Future[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. def using[T](extractor: Extractor[Message, T])(actionT: Action[T])(implicit msg: Message): Unit

    Permalink

    Generic extractor for messages.

    Generic extractor for messages.

    Example:
    1. onCommand('hello) { implicit msg =>
        using(_.from) {
          user =>
            reply(s"Hello ${user.firstName}!")
        }
      }
  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

Inherited from AnyRef

Inherited from Any

Ungrouped