Skip to content

sendVenue

Sahri Riza Umami edited this page Jun 22, 2018 · 3 revisions

Send a message with information about a venue.

sendVenue(chat_id, reply_to_message_id, latitude, longitude, title, address, provider, id, disable_notification, from_background, reply_markup)
Field Type Description
chat_id int53 Target chat.
reply_to_message_id int53 Identifier of the message to reply to.
latitude double Latitude of the location in degrees; as defined by the sender.
longitude double Longitude of the location in degrees; as defined by the sender.
title string Venue name; as defined by the sender.
address string Venue address; as defined by the sender.
provider string Provider of the venue database; as defined by the sender. Currently only "foursquare" needs to be supported.
id string Identifier of the venue in the provider database; as defined by the sender.
disable_notification Bool Pass true to disable notification for the message. Not supported in secret chats.
from_background Bool Pass true if the message is sent from the background.
reply_markup ReplyMarkup Markup for replying to the message; for bots only.

Example

  • Reply message 16066281472 in chat 1234567890 with a venue message.

    sendVenue(1234567890, 16066281472, -6.24745,107.148, 'Bekasi', 'Where is that?')

    Response:

    {
      ["@type"] = "message",
      author_signature = "",
      can_be_deleted_for_all_users = true,
      can_be_deleted_only_for_self = false,
      can_be_edited = false,
      can_be_forwarded = true,
      chat_id = "1234567890",
      contains_unread_mention = false,
      content = {
        ["@type"] = "messageVenue",
        venue = {
          ["@type"] = "venue",
          address = "Where is that?",
          id = "nil",
          location = {
            ["@type"] = "location",
            latitude = -6.24745,
            longitude = 107.148
          },
          provider = "nil",
          title = "Bekasi"
        }
      },
      date = 1529658716,
      edit_date = 0,
      id = "16066281481",
      is_channel_post = false,
      is_outgoing = true,
      media_album_id = "0",
      reply_to_message_id = "16066281472",
      sender_user_id = 66666666,
      sending_state = {
        ["@type"] = "messageSendingStatePending"
      },
      ttl = 0,
      ttl_expires_in = 0,
      via_bot_user_id = 0,
      views = 0
    }

Frequently Asked Questions
The Functions

Clone this wiki locally