Class SendLocation

java.lang.Object
io.github.natanimn.telebof.requests.AbstractBaseRequest<SendLocation, Message>
io.github.natanimn.telebof.requests.send.SendLocation

public class SendLocation extends AbstractBaseRequest<SendLocation, Message>
SendLocation class. Returns sent Message on success.
Since:
3 March 2025
  • Constructor Details

    • SendLocation

      public SendLocation(Object chat_id, double latitude, double longitude, Api api)
      Required
      Parameters:
      chat_id - chat id
      latitude - latitude
      longitude - longitude
      api - api
  • Method Details

    • horizontalAccuracy

      public SendLocation horizontalAccuracy(double horizontal_accuracy)
      Optional
      Parameters:
      horizontal_accuracy - The radius of uncertainty for the location, measured in meters; 0-1500
      Returns:
      SendLocation
    • livePeriod

      public SendLocation livePeriod(int live_period)
      Optional
      Parameters:
      live_period - Period in seconds during which the location will be updated (should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
      Returns:
      SendLocation
      See Also:
    • heading

      public SendLocation heading(int heading)
      Optional
      Parameters:
      heading - For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
      Returns:
      SendLocation
    • proximityAlertRadius

      public SendLocation proximityAlertRadius(int proximity_alert_radius)
      Optional
      Parameters:
      proximity_alert_radius - For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
      Returns:
      SendLocation
    • disableNotification

      public SendLocation disableNotification(boolean disable_notification)
      Optional
      Parameters:
      disable_notification - Sends the message silently. Users will receive a notification with no sound.
      Returns:
      SendLocation
    • protectContent

      public SendLocation protectContent(boolean protect_content)
      Optional
      Parameters:
      protect_content - Protects the contents of the sent message from forwarding and saving
      Returns:
      SendLocation
    • replyParameters

      public SendLocation replyParameters(ReplyParameters reply_parameters)
      Optional
      Parameters:
      reply_parameters - Description of the message to reply to
      Returns:
      SendLocation
    • replyMarkup

      public SendLocation replyMarkup(Markup reply_markup)
      Optional
      Parameters:
      reply_markup - Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
      Returns:
      SendLocation
    • businessConnectionId

      public SendLocation businessConnectionId(String business_connection_id)
      Optional
      Parameters:
      business_connection_id - Unique identifier of the business connection on behalf of which the message will be sent
      Returns:
      SendLocation
    • messageEffectId

      public SendLocation messageEffectId(String message_effect_id)
      Optional
      Parameters:
      message_effect_id - Unique identifier of the message effect to be added to the message; for private chats only
      Returns:
      SendLocation