All Downloads are FREE. Search and download functionalities are using the official Maven repository.

telegramium.bots.WebhookInfo.scala Maven / Gradle / Ivy

package telegramium.bots

/** Describes the current status of a webhook.
  *
  * @param url
  *   Webhook URL, may be empty if webhook is not set up
  * @param hasCustomCertificate
  *   True, if a custom certificate was provided for webhook certificate checks
  * @param pendingUpdateCount
  *   Number of updates awaiting delivery
  * @param ipAddress
  *   Optional. Currently used webhook IP address
  * @param lastErrorDate
  *   Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
  * @param lastErrorMessage
  *   Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an
  *   update via webhook
  * @param lastSynchronizationErrorDate
  *   Optional. Unix time of the most recent error that happened when trying to synchronize available updates with
  *   Telegram datacenters
  * @param maxConnections
  *   Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
  * @param allowedUpdates
  *   Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
  */
final case class WebhookInfo(
  url: String,
  hasCustomCertificate: Boolean,
  pendingUpdateCount: Int,
  ipAddress: Option[String] = Option.empty,
  lastErrorDate: Option[Int] = Option.empty,
  lastErrorMessage: Option[String] = Option.empty,
  lastSynchronizationErrorDate: Option[Int] = Option.empty,
  maxConnections: Option[Int] = Option.empty,
  allowedUpdates: List[String] = List.empty
)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy