Liking cljdoc? Tell your friends :D
Clojure only.

telegrambot-lib.core

A Clojure library for interacting with the Telegram Bot API.

A Clojure library for interacting with the Telegram Bot API.
- [Getting started](https://github.com/wdhowe/telegrambot-lib#usage)
raw docstring

add-sticker-to-setclj

(add-sticker-to-set this content)
(add-sticker-to-set this user_id name sticker)

Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.

Required

  • this ; a bot instance
  • user_id ; id of sticker set owner
  • name ; sticker set name
  • sticker ; A JSON-serialized object(InputSticker) with info about the added sticker.
Use this method to add a new sticker to a set created by the bot.
The format of the added sticker must match the format of the other stickers in the set.
Emoji sticker sets can have up to 200 stickers.
Animated and video sticker sets can have up to 50 stickers.
Static sticker sets can have up to 120 stickers.
Returns True on success.

Required
- this ; a bot instance
- user_id ; id of sticker set owner
- name ; sticker set name
- sticker ; A JSON-serialized object(InputSticker) with info about the added sticker.
sourceraw docstring

answer-callback-querycljmultimethod

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

Required

  • this ; a bot instance
  • callback_query_id ; unique identifier for the query to be answered

Optional

  • text ; text of the notification
  • show_alert ; if true, show alert instead of a notification
  • url ; url that will be opened by the user's client.
  • cache_time ; max time in seconds for caching callback query. (default: 0)
Use this method to send answers to callback queries sent from inline keyboards.
The answer will be displayed to the user as a notification at the top of the
chat screen or as an alert.
On success, True is returned.

Required
- this ; a bot instance
- callback_query_id ; unique identifier for the query to be answered

Optional
- text ; text of the notification
- show_alert ; if true, show alert instead of a notification
- url ; url that will be opened by the user's client.
- cache_time ; max time in seconds for caching callback query. (default: 0)
sourceraw docstring

answer-inline-queryclj

(answer-inline-query this content)
(answer-inline-query this inline_query_id results)
(answer-inline-query this inline_query_id results & optional)

Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.

Required

  • this ; a bot instance
  • inline_query_id ; id for the answered query
  • results ; json array of results for inline query

Optional

  • cache_time ; max time in seconds
  • is_personal ; true if query results are cached only for individuals
  • next_offset ; Pagination offset a client should use for more results
  • button ; A JSON-serialized object describing a button to be shown above inline query results.
Use this method to send answers to an inline query.
On success, True is returned.
No more than 50 results per query are allowed.

Required
- this ; a bot instance
- inline_query_id ; id for the answered query
- results ; json array of results for inline query

Optional
- cache_time ; max time in seconds
- is_personal ; true if query results are cached only for individuals
- next_offset ; Pagination offset a client should use for more results
- button ; A JSON-serialized object describing a button to be shown above inline query results.
sourceraw docstring

answer-precheckout-query-errorclj

(answer-precheckout-query-error this content)
(answer-precheckout-query-error this pre_checkout_query_id error_message)

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Sets 'ok' param to false.

Required

  • this ; a bot instance
  • pre_checkout_query_id ; id of query to be answered
  • ok ; true if all is good (in stock, etc) and bot is ready to proceed with order (auto set by this function)
  • error_message ; Required if 'ok' is false, message why checkout cannot proceed
Once the user has confirmed their payment and shipping details,
the Bot API sends the final confirmation in the form of an Update
with the field pre_checkout_query.
Use this method to respond to such pre-checkout queries.
On success, True is returned.
Sets 'ok' param to false.

Required
- this ; a bot instance
- pre_checkout_query_id ; id of query to be answered
- ok ; true if all is good (in stock, etc) and bot is ready to proceed with order
       (auto set by this function)
- error_message ; Required if 'ok' is false, message why checkout cannot proceed
sourceraw docstring

answer-precheckout-query-okcljmultimethod

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Sets 'ok' param to true.

Required

  • this ; a bot instance
  • pre_checkout_query_id ; id of query to be answered
  • ok ; true if all is good (in stock, etc) and bot is ready to proceed with order (auto set by this function)
Once the user has confirmed their payment and shipping details,
the Bot API sends the final confirmation in the form of an Update
with the field pre_checkout_query.
Use this method to respond to such pre-checkout queries.
On success, True is returned.
Sets 'ok' param to true.

Required
- this ; a bot instance
- pre_checkout_query_id ; id of query to be answered
- ok ; true if all is good (in stock, etc) and bot is ready to proceed with order
       (auto set by this function)
sourceraw docstring

answer-shipping-query-errorclj

(answer-shipping-query-error this content)
(answer-shipping-query-error this shipping_query_id error_message)

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. Sets 'ok' param to false.

Required

  • this ; a bot instance
  • shipping_query_id ; id of query to be answered
  • ok ; true if delivery to address is possible (auto set by this function)
  • error_message ; Required if 'ok' is false, message why order cannot complete
If you sent an invoice requesting a shipping address
and the parameter is_flexible was specified, the Bot API
will send an Update with a shipping_query field to the bot.
Use this method to reply to shipping queries.
On success, True is returned.
Sets 'ok' param to false.

Required
- this ; a bot instance
- shipping_query_id ; id of query to be answered
- ok ; true if delivery to address is possible (auto set by this function)
- error_message ; Required if 'ok' is false, message why order cannot complete
sourceraw docstring

answer-shipping-query-okclj

(answer-shipping-query-ok this content)
(answer-shipping-query-ok this shipping_query_id shipping_options)

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. Sets 'ok' param to true.

Required

  • this ; a bot instance
  • shipping_query_id ; id of query to be answered
  • ok ; true if delivery to address is possible (auto set by this function)
  • shipping_options ; Required if 'ok' is true, array of shipping options
If you sent an invoice requesting a shipping address
and the parameter is_flexible was specified, the Bot API
will send an Update with a shipping_query field to the bot.
Use this method to reply to shipping queries.
On success, True is returned.
Sets 'ok' param to true.

Required
- this ; a bot instance
- shipping_query_id ; id of query to be answered
- ok ; true if delivery to address is possible (auto set by this function)
- shipping_options ; Required if 'ok' is true, array of shipping options
sourceraw docstring

answer-web-app-queryclj

(answer-web-app-query this content)
(answer-web-app-query this web_app_query_id result)

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.

Required

  • this ; a bot instance
  • web_app_query_id ; id for the answered query
  • result ; json object describing message to be sent
Use this method to set the result of an interaction with a Web App and
send a corresponding message on behalf of the user to the chat from
which the query originated.
On success, a SentWebAppMessage object is returned.

Required
- this ; a bot instance
- web_app_query_id ; id for the answered query
- result ; json object describing message to be sent
sourceraw docstring

approve-chat-join-requestclj

(approve-chat-join-request this content)
(approve-chat-join-request this chat_id user_id)

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
Use this method to approve a chat join request.
The bot must be an administrator in the chat for this to work and
must have the can_invite_users administrator right.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
sourceraw docstring

ban-chat-memberclj

(ban-chat-member this content)
(ban-chat-member this chat_id user_id)
(ban-chat-member this chat_id user_id & optional)

Use this method to ban a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user

Optional

  • until_date ; unix time when user is unbanned. 30 seconds - 366 days. if less or more, user is banned forever.
  • revoke_messages ; true to delete all messages from chat for user being removed. always true for supergroups and channels.
Use this method to ban a user from a group, a supergroup or a channel.
In the case of supergroups and channels, the user will not be able to
return to the group on their own using invite links, etc., unless unbanned first.
The bot must be an administrator in the chat for this to work and must have the
appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user

Optional
- until_date ; unix time when user is unbanned. 30 seconds - 366 days.
               if less or more, user is banned forever.
- revoke_messages ; true to delete all messages from chat for user being removed.
                    always true for supergroups and channels.
sourceraw docstring

ban-chat-sender-chatclj

(ban-chat-sender-chat this content)
(ban-chat-sender-chat this chat_id sender_chat_id)
(ban-chat-sender-chat this chat_id sender_chat_id & optional)

Use this method to ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • sender_chat_id ; target sender chat

Optional

  • until_date ; date in unix time when the sender chat will be unbanned
Use this method to ban a channel chat in a supergroup or a channel.
The owner of the chat will not be able to send messages and join live streams on
behalf of the chat, unless it is unbanned first. The bot must be an administrator
in the supergroup or channel for this to work and must have the appropriate administrator rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- sender_chat_id ; target sender chat

Optional
- until_date ; date in unix time when the sender chat will be unbanned
sourceraw docstring

callclj

(call this endpoint)
(call this endpoint content)

A generic function to call any endpoint with optional content. Provided in the case where methods are added to the API and are not available in this library yet.

Required

  • this ; a bot instance
  • endpoint ; the api method path

Optional

  • content ; parameters for the api method
A generic function to call any `endpoint` with optional `content`.
Provided in the case where methods are added to the API and
are not available in this library yet.

Required
- this ; a bot instance
- endpoint ; the api method path

Optional
- content ; parameters for the api method
sourceraw docstring

closeclj

(close this)

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success.

Required

  • this ; a bot instance
Use this method to close the bot instance before moving it from one local
server to another. You need to delete the webhook before calling this method
to ensure that the bot isn't launched again after server restart. The method
will return error 429 in the first 10 minutes after the bot is launched.
Returns True on success.

Required
- this ; a bot instance
sourceraw docstring

close-forum-topicclj

(close-forum-topic this content)
(close-forum-topic this chat_id message_thread_id)

Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_thread_id ; id of the target thread of the forum.
Use this method to close an open topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and
must have the can_manage_topics administrator rights, unless it is the creator of the topic.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_thread_id ; id of the target thread of the forum.
sourceraw docstring

close-general-forum-topiccljmultimethod

Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
Use this method to close an open 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
the can_manage_topics administrator rights.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
sourceraw docstring

copy-messageclj

(copy-message this content)
(copy-message this chat_id from_chat_id message_id)
(copy-message this chat_id from_chat_id message_id & optional)

Use this method to copy messages of any kind. The method is analogous to the method forwardMessages, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • from_chat_id ; id of chat from original message
  • message_id ; message id in chat specified in 'from_chat_id'

Optional

  • message_thread_id ; id of the target thread of the forum.
  • caption ; new caption for media
  • parse_mode ; entity parsing
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to copy messages of any kind.
The method is analogous to the method forwardMessages, but the copied
message doesn't have a link to the original message.
Returns the MessageId of the sent message on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- from_chat_id ; id of chat from original message
- message_id ; message id in chat specified in 'from_chat_id'

Optional
- message_thread_id ; id of the target thread of the forum.
- caption ; new caption for media
- parse_mode ; entity parsing
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

copy-messagesclj

(copy-messages this content)
(copy-messages this chat_id from_chat_id message_ids)
(copy-messages this chat_id from_chat_id message_ids & optional)

Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • from_chat_id ; id of chat from original message
  • message_ids ; message id in chat specified in 'from_chat_id'

Optional

  • message_thread_id ; id of the target thread of the forum.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • remove_caption ; True to copy the messages without captions.
Use this method to copy messages of any kind.
If some of the specified messages can't be found or copied, they are skipped.
Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied.
A quiz poll can be copied only if the value of the field correct_option_id is known to the bot.
The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message.
Album grouping is kept for copied messages.
On success, an array of MessageId of the sent messages is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- from_chat_id ; id of chat from original message
- message_ids ; message id in chat specified in 'from_chat_id'

Optional
- message_thread_id ; id of the target thread of the forum.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- remove_caption ; True to copy the messages without captions.
sourceraw docstring

createcljmultimethod

Create a new Telegram Bot data structure.

  • No parameters attempts to load the bot-token from the environment.
    • Example: (create)
  • 1 parameter will use the passed in bot-token.
    • Example: (create "12345")
  • Alternatively, parameters can be passed as a map instead.
    • Example: (create {:bot-token "12345"})

Optional Parameters

  • bot-token ; The token id of your bot. (default: load from environment)
  • async ; Send API requests async or not. (default: false)
  • bot-api ; The Telegram Bot API URL. (default: official hosted API)

Returns: A map data structure of a bot config.

Create a new Telegram Bot data structure.
- No parameters attempts to load the `bot-token` from the environment.
  - Example: `(create)`
- 1 parameter will use the passed in `bot-token`.
  - Example: `(create "12345")`
- Alternatively, parameters can be passed as a map instead.
  - Example: `(create {:bot-token "12345"})`

Optional Parameters
- bot-token ; The token id of your bot. (default: load from environment)
- async ; Send API requests async or not. (default: false)
- bot-api ; The Telegram Bot API URL. (default: official hosted API)

Returns: A map data structure of a bot config.
sourceraw docstring

Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)

Optional

  • name ; invite name link
  • expire_date ; unix timestamp when the link will expire
  • member_limit ; max num users that can be members simulatneously (1-99999)
  • creates_join_request ; true if users joining need to be approved
Use this method to create an additional invite link for a chat.
The bot must be an administrator in the chat for this to work and must have
the appropriate admin rights. The link can be revoked using the method revokeChatInviteLink.
Returns the new invite link as ChatInviteLink object.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)

Optional
- name ; invite name link
- expire_date ; unix timestamp when the link will expire
- member_limit ; max num users that can be members simulatneously (1-99999)
- creates_join_request ; true if users joining need to be approved
sourceraw docstring

create-forum-topicclj

(create-forum-topic this content)
(create-forum-topic this chat_id name)
(create-forum-topic this chat_id name & optional)

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • name ; the topic name.

Optional

  • icon_color ; integer color of the topic icon in RGB format.
  • icon_custom_emoji_id ; string id of custom emoji shown as topic icon.
Use this method to create a topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and
must have the can_manage_topics administrator rights.
Returns information about the created topic as a ForumTopic object.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- name ; the topic name.

Optional
- icon_color ; integer color of the topic icon in RGB format.
- icon_custom_emoji_id ; string id of custom emoji shown as topic icon.
sourceraw docstring

(create-invoice-link this content)
(create-invoice-link this
                     title
                     description
                     payload
                     provider_token
                     currency
                     prices)
(create-invoice-link this
                     title
                     description
                     payload
                     provider_token
                     currency
                     prices
                     &
                     optional)

Use this method to create a link for an invoice. Returns the created invoice link as String on success.

Required

  • title ; product name
  • description ; product description
  • payload ; internal bot defined invoice payload
  • provider_token ; payments provider token
  • currency ; three letter ISO 4217 currency code
  • prices ; 'LabeledPrice' array breakdown (price, tax, discount, delivery, etc)

Optional

  • max_tip_amount ; integer of max tip accepted. US $1.45 = 145.
  • suggested_tip_amounts ; json serialized array of integer tip amounts, 4 max suggested tips, positive numbers, increasing order, and must not exceed max_tip_amount.
  • provider_data ; json data about invoice, payment provider specific
  • photo_url ; product photo for the invoice
  • photo_size ; size in bytes
  • photo_width ; width
  • photo_height ; height
  • need_name ; true if the user's full name is required for order
  • need_phone_number ; true if the user's phone number is required for order
  • need_email ; true if the user's email is required for order
  • need_shipping_address ; true if the user's address is required for order
  • send_phone_number_to_provider ; true to send phone number to provider
  • send_email_to_provider ; true to send email to provider
  • is_flexible ; true if final price depends on shipping method
Use this method to create a link for an invoice.
Returns the created invoice link as String on success.

Required
- title ; product name
- description ; product description
- payload ; internal bot defined invoice payload
- provider_token ; payments provider token
- currency ; three letter ISO 4217 currency code
- prices ; 'LabeledPrice' array breakdown (price, tax, discount, delivery, etc)

Optional
- max_tip_amount ; integer of max tip accepted. US $1.45 = 145.
- suggested_tip_amounts ; json serialized array of integer tip amounts, 4 max suggested tips,
  positive numbers, increasing order, and must not exceed max_tip_amount.
- provider_data ; json data about invoice, payment provider specific
- photo_url ; product photo for the invoice
- photo_size ; size in bytes
- photo_width ; width
- photo_height ; height
- need_name ; true if the user's full name is required for order
- need_phone_number ; true if the user's phone number is required for order
- need_email ; true if the user's email is required for order
- need_shipping_address ; true if the user's address is required for order
- send_phone_number_to_provider ; true to send phone number to provider
- send_email_to_provider ; true to send email to provider
- is_flexible ; true if final price depends on shipping method
sourceraw docstring

create-new-sticker-setclj

(create-new-sticker-set this content)
(create-new-sticker-set this user_id name title stickers)
(create-new-sticker-set this user_id name title stickers & optional)

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.

Required

  • this ; a bot instance
  • user_id ; id of created sticker set owner
  • name ; short name of sticker set for use in URLs
  • title ; sticker set title
  • stickers ; A JSON-serialized list of 1-50 stickers to be added to the set.

Optional

  • sticker_type ; Type of stickers, 'regular' (default), 'mask', 'custom_emoji'.
  • needs_repainting ; True if stickers must be repainted to color of text in messages. (custom emoji sets only)
Use this method to create a new sticker set owned by a user. The bot will
be able to edit the sticker set thus created.
Returns True on success.

Required
- this ; a bot instance
- user_id ; id of created sticker set owner
- name ; short name of sticker set for use in URLs
- title ; sticker set title
- stickers ; A JSON-serialized list of 1-50 stickers to be added to the set.

Optional
- sticker_type ; Type of stickers, 'regular' (default), 'mask', 'custom_emoji'.
- needs_repainting ; True if stickers must be repainted to color of text in messages. (custom emoji sets only)
sourceraw docstring

decline-chat-join-requestclj

(decline-chat-join-request this content)
(decline-chat-join-request this chat_id user_id)

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
Use this method to decline a chat join request.
The bot must be an administrator in the chat for this to work and
must have the can_invite_users administrator right.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
sourceraw docstring

delete-chat-photocljmultimethod

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to delete a chat photo. Photos can't be changed for private chats.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

delete-chat-sticker-setcljmultimethod

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to delete a group sticker set from a supergroup.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Use the field can_set_sticker_set optionally returned in getChat requests to
check if the bot can use this method.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

delete-forum-topicclj

(delete-forum-topic this content)
(delete-forum-topic this chat_id message_thread_id)

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_thread_id ; id of the target thread of the forum.
Use this method to delete a forum topic along with all its messages in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and
must have the can_delete_messages administrator rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_thread_id ; id of the target thread of the forum.
sourceraw docstring

delete-messageclj

(delete-message this content)
(delete-message this chat_id message_id)

Use this method to delete a message, including service messages. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to delete
Use this method to delete a message, including service messages.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to delete
sourceraw docstring

delete-messagesclj

(delete-messages this content)
(delete-messages this chat_id message_ids)

Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_ids ; List of IDs, 1-100 messages to delete.
Use this method to delete multiple messages simultaneously.
If some of the specified messages can't be found, they are skipped.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_ids ; List of IDs, 1-100 messages to delete.
sourceraw docstring

delete-my-commandsclj

(delete-my-commands this)
(delete-my-commands this content)

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

Required

  • this ; a bot instance

Optional

  • scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
  • language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
Use this method to delete the list of the bot's commands for the given scope and user language.
After deletion, higher level commands will be shown to affected users.
Returns True on success.

Required
- this ; a bot instance

Optional
- scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
- language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
sourceraw docstring

delete-sticker-from-setcljmultimethod

Use this method to delete a sticker from a set created by the bot. Returns True on success.

Required

  • this ; a bot instance
  • sticker ; file id of the sticker
Use this method to delete a sticker from a set created by the bot.
Returns True on success.

Required
- this ; a bot instance
- sticker ; file id of the sticker
sourceraw docstring

delete-sticker-setcljmultimethod

Use this method to delete a sticker set that was created by the bot. Returns True on success.

Required

  • this ; a bot instance
  • name ; Sticker set name.
Use this method to delete a sticker set that was created by the bot.
Returns True on success.

Required
- this ; a bot instance
- name ; Sticker set name.
sourceraw docstring

delete-webhookclj

(delete-webhook this)
(delete-webhook this content)

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

Required

  • this ; a bot instance

Optional

  • drop_pending_updates ; Pass True to drop all pending updates
Use this method to remove webhook integration if you decide to
switch back to getUpdates.
Returns True on success.

Required
- this ; a bot instance

Optional
- drop_pending_updates ; Pass True to drop all pending updates
sourceraw docstring

(edit-chat-invite-link this content)
(edit-chat-invite-link this chat_id invite_link)
(edit-chat-invite-link this chat_id invite_link & optional)

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a ChatInviteLink object.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • invite_link ; invite link to edit

Optional

  • name ; invite name link
  • expire_date ; unix timestamp when the link will expire
  • member_limit ; max num users that can be members simulatneously (1-99999)
  • creates_join_request ; true if users joining need to be approved
Use this method to edit a non-primary invite link created by the bot.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns the edited invite link as a ChatInviteLink object.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- invite_link ; invite link to edit

Optional
- name ; invite name link
- expire_date ; unix timestamp when the link will expire
- member_limit ; max num users that can be members simulatneously (1-99999)
- creates_join_request ; true if users joining need to be approved
sourceraw docstring

edit-forum-topicclj

(edit-forum-topic this content)
(edit-forum-topic this chat_id message_thread_id)
(edit-forum-topic this chat_id message_thread_id & optional)

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_thread_id ; id of the target thread of the forum.

Optional

  • name ; the topic name.
  • icon_custom_emoji_id ; string id of custom emoji shown as topic icon.
Use this method to edit name and icon of a topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
can_manage_topics administrator rights, unless it is the creator of the topic.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_thread_id ; id of the target thread of the forum.

Optional
- name ; the topic name.
- icon_custom_emoji_id ; string id of custom emoji shown as topic icon.
sourceraw docstring

edit-general-forum-topicclj

(edit-general-forum-topic this content)
(edit-general-forum-topic this chat_id name)

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
  • name ; The topic name.
Use this method to edit the name of the 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
can_manage_topics administrator rights.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
- name ; The topic name.
sourceraw docstring

edit-message-captionclj

(edit-message-caption this content)
(edit-message-caption this chat_id message_id caption)
(edit-message-caption this chat_id message_id caption & optional)

Use this method to edit captions of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to edit
  • caption ; new caption of message

Optional

  • parse_mode ; entity parsing in message
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • reply_markup ; inline keyboard markup
Use this method to edit captions of messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to edit
- caption ; new caption of message

Optional
- parse_mode ; entity parsing in message
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-caption-inlineclj

(edit-message-caption-inline this content)
(edit-message-caption-inline this inline_message_id caption)
(edit-message-caption-inline this inline_message_id caption & optional)

Use this method to edit captions of inline messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • caption ; new caption of message

Optional

  • parse_mode ; entity parsing in message
  • reply_markup ; inline keyboard markup
Use this method to edit captions of inline messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- caption ; new caption of message

Optional
- parse_mode ; entity parsing in message
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-live-locationclj

(edit-message-live-location this content)
(edit-message-live-location this chat_id message_id latitude longitude)
(edit-message-live-location this
                            chat_id
                            message_id
                            latitude
                            longitude
                            &
                            optional)

Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of the message to edit
  • latitude ; lat of new location
  • longitude ; long of new location

Optional

  • horizontal_accuracy ; 1-1500 meters radius of uncertainty
  • heading ; 1-360 degrees direction user is moving
  • proximity_alert_radius ; 1-100000 meters max distance for proximity alerts
  • reply_markup ; additional interface options
Use this method to edit live location messages.
A location can be edited until its live_period expires or editing is
explicitly disabled by a call to stopMessageLiveLocation.
On success, if the edited message was sent by the bot, the edited
Message is returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of the message to edit
- latitude ; lat of new location
- longitude ; long of new location

Optional
- horizontal_accuracy ; 1-1500 meters radius of uncertainty
- heading ; 1-360 degrees direction user is moving
- proximity_alert_radius ; 1-100000 meters max distance for proximity alerts
- reply_markup ; additional interface options
sourceraw docstring

edit-message-live-location-inlineclj

(edit-message-live-location-inline this content)
(edit-message-live-location-inline this inline_message_id latitude longitude)
(edit-message-live-location-inline this
                                   inline_message_id
                                   latitude
                                   longitude
                                   &
                                   optional)

Use this method to edit live location inline messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message to edit
  • latitude ; lat of new location
  • longitude ; long of new location

Optional

  • reply_markup ; additional interface options
Use this method to edit live location inline messages.
A location can be edited until its live_period expires or editing is
explicitly disabled by a call to stopMessageLiveLocation.
On success, if the edited message was sent by the bot, the edited
Message is returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message to edit
- latitude ; lat of new location
- longitude ; long of new location

Optional
- reply_markup ; additional interface options
sourceraw docstring

edit-message-mediaclj

(edit-message-media this content)
(edit-message-media this chat_id message_id media)
(edit-message-media this chat_id message_id media & optional)

Use this method to edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to edit
  • media ; json object for new media content

Optional

  • reply_markup ; inline keyboard markup
Use this method to edit animation, audio, document, photo, or video messages.
If a message is a part of a message album, then it can be edited only to a
photo or a video. Otherwise, message type can be changed arbitrarily.
When inline message is edited, new file can't be uploaded.
Use previously uploaded file via its file_id or specify a URL.
On success, if the edited message was sent by the bot, the edited Message
is returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to edit
- media ; json object for new media content

Optional
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-media-inlineclj

(edit-message-media-inline this content)
(edit-message-media-inline this inline_message_id media)
(edit-message-media-inline this inline_message_id media & optional)

Use this method to edit inline animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • media ; json object for new media content

Optional

  • reply_markup ; inline keyboard markup
Use this method to edit inline animation, audio, document, photo, or video messages.
If a message is a part of a message album, then it can be edited only to a
photo or a video. Otherwise, message type can be changed arbitrarily.
When inline message is edited, new file can't be uploaded.
Use previously uploaded file via its file_id or specify a URL.
On success, if the edited message was sent by the bot, the edited Message
is returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- media ; json object for new media content

Optional
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-reply-markupclj

(edit-message-reply-markup this content)
(edit-message-reply-markup this chat_id message_id reply_markup)

Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to edit
  • reply_markup ; inline keyboard markup
Use this method to edit only the reply markup of messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to edit
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-reply-markup-inlineclj

(edit-message-reply-markup-inline this content)
(edit-message-reply-markup-inline this inline_message_id reply_markup)

Use this method to edit only the reply markup of inline messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • reply_markup ; inline keyboard markup
Use this method to edit only the reply markup of inline messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-textclj

(edit-message-text this content)
(edit-message-text this chat_id message_id text)
(edit-message-text this chat_id message_id text & optional)

Use this method to edit text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to edit
  • text ; new text of message

Optional

  • parse_mode ; entity parsing in message
  • entities ; list of MessageEntity - can use instead of parse_mode
  • link_preview_options ; link preview generation options.
  • reply_markup ; inline keyboard markup
Use this method to edit text and game messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to edit
- text ; new text of message

Optional
- parse_mode ; entity parsing in message
- entities ; list of MessageEntity - can use instead of parse_mode
- link_preview_options ; link preview generation options.
- reply_markup ; inline keyboard markup
sourceraw docstring

edit-message-text-inlineclj

(edit-message-text-inline this content)
(edit-message-text-inline this inline_message_id text)
(edit-message-text-inline this inline_message_id text & optional)

Use this method to edit inline text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • text ; new text of message

Optional

  • parse_mode ; entity parsing in message
  • link_preview_options ; link preview generation options.
  • reply_markup ; inline keyboard markup
Use this method to edit inline text and game messages.
On success, if edited message is sent by the bot, the edited Message is
returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- text ; new text of message

Optional
- parse_mode ; entity parsing in message
- link_preview_options ; link preview generation options.
- reply_markup ; inline keyboard markup
sourceraw docstring

Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to generate a new invite link for a chat; any previously generated
link is revoked. The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Returns the new invite link as String on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

forward-messageclj

(forward-message this content)
(forward-message this chat_id from_chat_id message_id)
(forward-message this chat_id from_chat_id message_id & optional)

Use this method to forward messages of any kind. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • from_chat_id ; id of chat from original message
  • message_id ; message id in chat specified in 'from_chat_id'

Optional

  • message_thread_id ; id of the target thread of the forum.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
Use this method to forward messages of any kind.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- from_chat_id ; id of chat from original message
- message_id ; message id in chat specified in 'from_chat_id'

Optional
- message_thread_id ; id of the target thread of the forum.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
sourceraw docstring

forward-messagesclj

(forward-messages this content)
(forward-messages this chat_id from_chat_id message_ids)
(forward-messages this chat_id from_chat_id message_ids & optional)

Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • from_chat_id ; id of chat from original message
  • message_ids ; List of IDs, 1-100 messages in the chat from_chat_id to forward.

Optional

  • message_thread_id ; id of the target thread of the forum.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
Use this method to forward multiple messages of any kind.
If some of the specified messages can't be found or forwarded, they are skipped.
Service messages and messages with protected content can't be forwarded.
Album grouping is kept for forwarded messages.
On success, an array of MessageId of the sent messages is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- from_chat_id ; id of chat from original message
- message_ids ; List of IDs, 1-100 messages in the chat from_chat_id to forward.

Optional
- message_thread_id ; id of the target thread of the forum.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
sourceraw docstring

get-business-connectioncljmultimethod

Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.

Required

  • this ; a bot instance
  • business_connection_id ; Unique id of the business connection.
Use this method to get information about the connection of the bot with a business account.
Returns a BusinessConnection object on success.

Required
- this ; a bot instance
- business_connection_id ; Unique id of the business connection.
sourceraw docstring

get-chatcljmultimethod

Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to get up to date information about the chat
(current name of the user for one-on-one conversations,
current username of a user, group or channel, etc.).
Returns a Chat object on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

get-chat-administratorscljmultimethod

Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to get a list of administrators in a chat.
On success, returns an Array of ChatMember objects that contains information about
all chat administrators except other bots.
If the chat is a group or a supergroup and no administrators were appointed,
only the creator will be returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

get-chat-memberclj

(get-chat-member this content)
(get-chat-member this chat_id user_id)

Use this method to get information about a member of a chat. Returns a ChatMember object on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
Use this method to get information about a member of a chat.
Returns a ChatMember object on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
sourceraw docstring

get-chat-member-countcljmultimethod

Use this method to get the number of members in a chat. Returns Int on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to get the number of members in a chat.
Returns Int on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

get-chat-members-countcljmultimethoddeprecated

DEPRECATED: Use this method to get the number of members in a chat. Returns Int on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
DEPRECATED: Use this method to get the number of members in a chat.
Returns Int on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

get-chat-menu-buttonclj

(get-chat-menu-button this)
(get-chat-menu-button this content)

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.

Required

  • this ; a bot instance

Optional

  • chat_id ; target chat or username (@user)
Use this method to get the current value of the bot's menu button in a private chat, or the
default menu button.
Returns MenuButton on success.

Required
- this ; a bot instance

Optional
- chat_id ; target chat or username (@user)
sourceraw docstring

get-custom-emoji-stickerscljmultimethod

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

Required

  • this ; a bot instance
  • custom_emoji_ids ; a list of emoji identifiers
Use this method to get information about custom emoji stickers by their identifiers.
Returns an Array of Sticker objects.

Required
- this ; a bot instance
- custom_emoji_ids ; a list of emoji identifiers
sourceraw docstring

get-filecljmultimethod

Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bottoken/file_path, where file_path is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.

Required

  • this ; a bot instance
  • file_id ; file id to get info about
Use this method to get basic info about a file and prepare it for downloading.
For the moment, bots can download files of up to 20MB in size.
On success, a File object is returned. The file can then be downloaded via
the link https://api.telegram.org/file/bot`token`/`file_path`,
where `file_path` is taken from the response.
It is guaranteed that the link will be valid for at least 1 hour.
When the link expires, a new one can be requested by calling getFile again.

Required
- this ; a bot instance
- file_id ; file id to get info about
sourceraw docstring

get-forum-topic-icon-stickersclj

(get-forum-topic-icon-stickers this)

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.

Required

  • this ; a bot instance
Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
Requires no parameters.
Returns an Array of Sticker objects.

Required
- this ; a bot instance
sourceraw docstring

get-game-high-scoresclj

(get-game-high-scores this content)
(get-game-high-scores this chat_id message_id user_id)

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.

Required

  • this ; a bot instance
  • chat_id ; id of the target chat
  • message_id ; id of the sent message
  • user_id ; target user
Use this method to get data for high score tables.
Will return the score of the specified user and several of their neighbors in a game.
On success, returns an Array of GameHighScore objects.

Required
- this ; a bot instance
- chat_id ; id of the target chat
- message_id ; id of the sent message
- user_id ; target user
sourceraw docstring

get-game-high-scores-inlineclj

(get-game-high-scores-inline this content)
(get-game-high-scores-inline this inline_message_id user_id)

Use this method to get data for inline high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.

Required

  • this ; a bot instance
  • inline_message_id ; id of the sent message
  • user_id ; target user
Use this method to get data for inline high score tables.
Will return the score of the specified user and several of their neighbors in a game.
On success, returns an Array of GameHighScore objects.

Required
- this ; a bot instance
- inline_message_id ; id of the sent message
- user_id ; target user
sourceraw docstring

get-meclj

(get-me this)

A simple method for testing your bot's auth token. Returns basic information about the bot in form of a User object.

Required

  • this ; a bot instance
A simple method for testing your bot's auth token.
Returns basic information about the bot in form of a User object.

Required
- this ; a bot instance
sourceraw docstring

get-my-commandsclj

(get-my-commands this)
(get-my-commands this content)

Use this method to get the current list of the bot's commands. Returns Array of BotCommand on success.

Required

  • this ; a bot instance

Optional

  • scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
  • language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
Use this method to get the current list of the bot's commands.
Returns Array of BotCommand on success.

Required
- this ; a bot instance

Optional
- scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
- language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
sourceraw docstring

get-my-default-administrator-rightsclj

(get-my-default-administrator-rights this)
(get-my-default-administrator-rights this content)

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.

Required

  • this ; a bot instance

Optional

  • for_channels ; Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
Use this method to get the current default administrator rights of the bot.
Returns ChatAdministratorRights on success.

Required
- this ; a bot instance

Optional
- for_channels ; Pass True to get default administrator rights of the bot in channels.
                 Otherwise, default administrator rights of the bot for groups and
                 supergroups will be returned.
sourceraw docstring

get-my-descriptionclj

(get-my-description this)
(get-my-description this content)

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

Required

  • this ; a bot instance

Optional

  • language_code ; Two-letter ISO 639-1 lang code or an empty string.
Use this method to get the current bot description for the given user language.
Returns BotDescription on success.

Required
- this ; a bot instance

Optional
- language_code ; Two-letter ISO 639-1 lang code or an empty string.
sourceraw docstring

get-my-nameclj

(get-my-name this)
(get-my-name this content)

Use this method to get the current bot name for the given user language. Returns BotName on success.

Required

  • this ; a bot instance

Optional

  • language_code ; Two-letter ISO 639-1 lang code.
Use this method to get the current bot name for the given user language.
Returns BotName on success.

Required
- this ; a bot instance

Optional
- language_code ; Two-letter ISO 639-1 lang code.
sourceraw docstring

get-my-short-descriptionclj

(get-my-short-description this)
(get-my-short-description this content)

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

Required

  • this ; a bot instance

Optional

  • language_code ; Two-letter ISO 639-1 lang code or an empty string.
Use this method to get the current bot short description for the given user language.
Returns BotShortDescription on success.

Required
- this ; a bot instance

Optional
- language_code ; Two-letter ISO 639-1 lang code or an empty string.
sourceraw docstring

get-sticker-setcljmultimethod

Use this method to get a sticker set. On success, a StickerSet object is returned.

Required

  • this ; a bot instance
  • name ; name of the sticker set
Use this method to get a sticker set.
On success, a StickerSet object is returned.

Required
- this ; a bot instance
- name ; name of the sticker set
sourceraw docstring

get-updatesclj

(get-updates this)
(get-updates this content)

Use this method to receive incoming updates using long polling. An Array of Update objects is returned.

Required

  • this ; a bot instance

Optional - map of the following

  • offset ; id of first update to return
  • limit ; num of updates to retrieve (1-100). default: 100
  • timeout ; timeout in seconds. default: 0 (short poll)
  • allowed_updates ; json array of update types bot will receive
Use this method to receive incoming updates using long polling.
An Array of Update objects is returned.

Required
- this ; a bot instance

Optional - map of the following
- offset ; id of first update to return
- limit ; num of updates to retrieve (1-100). default: 100
- timeout ; timeout in seconds. default: 0 (short poll)
- allowed_updates ; json array of update types bot will receive
sourceraw docstring

get-user-chat-boostsclj

(get-user-chat-boosts this content)
(get-user-chat-boosts this chat_id user_id)

Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
Use this method to get the list of boosts added to a chat by a user.
Requires administrator rights in the chat.
Returns a UserChatBoosts object.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
sourceraw docstring

get-user-profile-photoscljmultimethod

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

Required

  • this ; a bot instance
  • user_id ; id of target user

Optional

  • offset ; number of first photo returned
  • limit ; limit number of photos retrieved (1-100, default: 100)
Use this method to get a list of profile pictures for a user.
Returns a UserProfilePhotos object.

Required
- this ; a bot instance
- user_id ; id of target user

Optional
- offset ; number of first photo returned
- limit ; limit number of photos retrieved (1-100, default: 100)
sourceraw docstring

get-webhook-infoclj

(get-webhook-info this)

Use this method to get current webhook status. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

Required

  • this ; a bot instance
Use this method to get current webhook status.
On success, returns a WebhookInfo object.
If the bot is using getUpdates, will return an object with the
url field empty.

Required
- this ; a bot instance
sourceraw docstring

hide-general-forum-topiccljmultimethod

Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
Use this method to hide the 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
the can_manage_topics administrator rights.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
sourceraw docstring

kick-chat-membercljdeprecated

(kick-chat-member this content)
(kick-chat-member this chat_id user_id)
(kick-chat-member this chat_id user_id & optional)

DEPRECATED: Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user

Optional

  • until_date ; unix time when user is unbanned. 30 seconds - 366 days. if less or more, user is banned forever.
  • revoke_messages ; true to delete all messages from chat for user being removed. always true for supergroups and channels.
DEPRECATED: Use this method to kick a user from a group, a supergroup or a channel.
In the case of supergroups and channels, the user will not be able to
return to the group on their own using invite links, etc., unless unbanned first.
The bot must be an administrator in the chat for this to work and must have the
appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user

Optional
- until_date ; unix time when user is unbanned. 30 seconds - 366 days.
               if less or more, user is banned forever.
- revoke_messages ; true to delete all messages from chat for user being removed.
                    always true for supergroups and channels.
sourceraw docstring

leave-chatcljmultimethod

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method for your bot to leave a group, supergroup or channel.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

log-outclj

(log-out this)

Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. Returns True on success.

Required

  • this ; a bot instance
Use this method to log out from the cloud Bot API server before launching
the bot locally. You must log out the bot before running it locally,
otherwise there is no guarantee that the bot will receive updates.
Returns True on success.

Required
- this ; a bot instance
sourceraw docstring

pin-chat-messageclj

(pin-chat-message this content)
(pin-chat-message this chat_id message_id)
(pin-chat-message this chat_id message_id & optional)

Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of message to pin

Optional

  • disable_notification ; true to pin silently. default true in channels.
Use this method to pin a message in a group, a supergroup, or a channel.
The bot must be an administrator in the chat for this to work and
must have the 'can_pin_messages' admin right in the supergroup or
'can_edit_messages' admin right in the channel.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of message to pin

Optional
- disable_notification ; true to pin silently. default true in channels.
sourceraw docstring

promote-chat-memberclj

(promote-chat-member this content)
(promote-chat-member this chat_id user_id)
(promote-chat-member this chat_id user_id & optional)

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user

Optional

  • is_anonymous ; true if admin presence in chat is hidden
  • can_manage_chat ; true if admin can access logs, stats, members, etc.
  • can_delete_messages ; true if admin can delete messages of other users
  • can_manage_video_chats ; true if admin can manage video chats, supergroups only
  • can_restrict_members ; true if admin can restrict, ban, unban members
  • can_promote_members ; true if admin can add new admins
  • can_change_info ; true if admin can change chat title, photo, other settings
  • can_invite_users ; true if admin can invite new users to chat
  • can_post_messages ; true if admin can create channel posts
  • can_edit_messages ; true if admin can edit messages of other users, pin messages
  • can_pin_messages ; true if admin can pin messages
  • can_post_stories ; true if the administrator can post stories in the channel
  • can_edit_stories ; true if the administrator can edit stories posted by other users
  • can_delete_stories ; true if the administrator can delete stories posted by other users
  • can_manage_topics ; true if user is allowed to create,rename,close,reopen forum topics.
Use this method to promote or demote a user in a supergroup or a channel.
The bot must be an administrator in the chat for this to work and must
have the appropriate admin rights.
Pass False for all boolean parameters to demote a user.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user

Optional
- is_anonymous ; true if admin presence in chat is hidden
- can_manage_chat ; true if admin can access logs, stats, members, etc.
- can_delete_messages ; true if admin can delete messages of other users
- can_manage_video_chats ; true if admin can manage video chats, supergroups only
- can_restrict_members ; true if admin can restrict, ban, unban members
- can_promote_members ; true if admin can add new admins
- can_change_info ; true if admin can change chat title, photo, other settings
- can_invite_users ; true if admin can invite new users to chat
- can_post_messages ; true if admin can create channel posts
- can_edit_messages ; true if admin can edit messages of other users, pin messages
- can_pin_messages ; true if admin can pin messages
- can_post_stories ; true if the administrator can post stories in the channel
- can_edit_stories ; true if the administrator can edit stories posted by other users
- can_delete_stories ; true if the administrator can delete stories posted by other users
- can_manage_topics ; true if user is allowed to create,rename,close,reopen forum topics.
sourceraw docstring

reopen-forum-topicclj

(reopen-forum-topic this content)
(reopen-forum-topic this chat_id message_thread_id)

Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_thread_id ; id of the target thread of the forum.
Use this method to reopen a closed topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and
must have the can_manage_topics administrator rights, unless it is the creator of the topic.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_thread_id ; id of the target thread of the forum.
sourceraw docstring

reopen-general-forum-topiccljmultimethod

Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
Use this method to reopen a closed 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
the can_manage_topics administrator rights.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
sourceraw docstring

replace-sticker-in-setclj

(replace-sticker-in-set this content)
(replace-sticker-in-set this user_id name old_sticker sticker)

Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.

Required

  • this ; a bot instance
  • user_id ; id of sticker set owner
  • name ; sticker set name
  • old_sticker ; File ID of the replaced sticker.
  • sticker ; A JSON-serialized object(InputSticker) with info about the added sticker.
Use this method to replace an existing sticker in a sticker set with a new one.
The method is equivalent to calling deleteStickerFromSet, then addStickerToSet,
then setStickerPositionInSet.
Returns True on success.

Required
- this ; a bot instance
- user_id ; id of sticker set owner
- name ; sticker set name
- old_sticker ; File ID of the replaced sticker.
- sticker ; A JSON-serialized object(InputSticker) with info about the added sticker.
sourceraw docstring

restrict-chat-memberclj

(restrict-chat-member this content)
(restrict-chat-member this chat_id user_id permissions)
(restrict-chat-member this chat_id user_id permissions & optional)

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
  • permissions ; json object 'ChatPermissions' for new user permissions

Optional

  • use_independent_chat_permissions ; True if chat permissions are set independently. Otherwise, some permissions imply others.
  • until_date ; unix time when user is unbanned. 30 seconds - 366 days. if less or more, user is banned forever.
Use this method to restrict a user in a supergroup.
The bot must be an administrator in the supergroup for this to work and
must have the appropriate admin rights. Pass True for all permissions to lift
restrictions from a user.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
- permissions ; json object 'ChatPermissions' for new user permissions

Optional
- use_independent_chat_permissions ; True if chat permissions are set independently.
                                     Otherwise, some permissions imply others.
- until_date ; unix time when user is unbanned. 30 seconds - 366 days.
               if less or more, user is banned forever.
sourceraw docstring

(revoke-chat-invite-link this content)
(revoke-chat-invite-link this chat_id invite_link)

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the revoked invite link as ChatInviteLink object.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • invite_link ; invite link to revoke
Use this method to revoke an invite link created by the bot.
If the primary link is revoked, a new link is automatically generated.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns the revoked invite link as ChatInviteLink object.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- invite_link ; invite link to revoke
sourceraw docstring

send-animationclj

(send-animation this content)
(send-animation this chat_id animation)
(send-animation this chat_id animation & optional)

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is rbeturned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • animation ; 'file_id' of animation to send that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • duration ; duration of animation in seconds
  • width
  • height
  • caption ; animation caption
  • parse_mode ; entity parsing in animation caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • has_spoiler ; true if animation needs to be covered with spoiler animation.
  • thumbnail ; thumbnail of file sent
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video
without sound).
On success, the sent Message is rbeturned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- animation ; 'file_id' of animation to send that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- duration ; duration of animation in seconds
- width
- height
- caption ; animation caption
- parse_mode ; entity parsing in animation caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- has_spoiler ; true if animation needs to be covered with spoiler animation.
- thumbnail ; thumbnail of file sent
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-audioclj

(send-audio this content)
(send-audio this chat_id audio)
(send-audio this chat_id audio & optional)

Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • audio ; 'file_id' of audio to send that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • caption ; audio caption
  • parse_mode ; entity parsing in audio caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • duration ; duration of audio in seconds
  • performer ; audio performer
  • title ; audio track title
  • thumbnail ; thumbnail of the file sent
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send audio files, if you want Telegram clients to
display them in the music player. Your audio must be in the .MP3 or
.M4A format.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- audio ; 'file_id' of audio to send that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- caption ; audio caption
- parse_mode ; entity parsing in audio caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- duration ; duration of audio in seconds
- performer ; audio performer
- title ; audio track title
- thumbnail ; thumbnail of the file sent
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-chat-actionclj

(send-chat-action this content)
(send-chat-action this chat_id action)
(send-chat-action this chat_id action & optional)

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • action ; type of action to broadcast (typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note, upload_video_note)

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; unique id for target message thread.
Use this method when you need to tell the user that something is happening
on the bot's side. The status is set for 5 seconds or less (when a message
arrives from your bot, Telegram clients clear its typing status).
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- action ; type of action to broadcast (typing, upload_photo, record_video, upload_video,
           record_voice, upload_voice, upload_document, choose_sticker, find_location,
           record_video_note, upload_video_note)

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; unique id for target message thread.
sourceraw docstring

send-contactclj

(send-contact this content)
(send-contact this chat_id phone_number first_name)
(send-contact this chat_id phone_number first_name last_name)
(send-contact this chat_id phone_number first_name last_name & optional)

Use this method to send phone contacts. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • phone_number ; contact phone number
  • first_name

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • last_name
  • vcard ; 'vCard' formatted additional data
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send phone contacts.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- phone_number ; contact phone number
- first_name

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- last_name
- vcard ; 'vCard' formatted additional data
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-dicecljmultimethod

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • emoji ; image for dice animation (default: dice)
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send an animated emoji that will display a random value.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- emoji ; image for dice animation (default: dice)
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-documentclj

(send-document this content)
(send-document this chat_id document)
(send-document this chat_id document & optional)

Use this method to send general files. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • document ; 'file_id' of document to send that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • caption ; document caption
  • parse_mode ; entity parsing in document caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • thumbnail ; thumbnail of the file sent
  • disable_content_type_detection ; disable auto content type detection for files uploaded
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send general files.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- document ; 'file_id' of document to send that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- caption ; document caption
- parse_mode ; entity parsing in document caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- thumbnail ; thumbnail of the file sent
- disable_content_type_detection ; disable auto content type detection for files uploaded
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-gameclj

(send-game this content)
(send-game this chat_id game_short_name)
(send-game this chat_id game_short_name & optional)

Use this method to send a game. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat id
  • game_short_name ; serves as unique id for the game

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • disable_notification ; send message silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; inline keyboard markup
Use this method to send a game.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat id
- game_short_name ; serves as unique id for the game

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- disable_notification ; send message silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; inline keyboard markup
sourceraw docstring

send-invoiceclj

(send-invoice this content)
(send-invoice this
              chat_id
              title
              description
              payload
              provider_token
              currency
              prices)
(send-invoice this
              chat_id
              title
              description
              payload
              provider_token
              currency
              prices
              &
              optional)

Use this method to send invoices. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; id for the target private chat
  • title ; product name
  • description ; product description
  • payload ; internal bot defined invoice payload
  • provider_token ; payments provider token
  • currency ; three letter ISO 4217 currency code
  • prices ; 'LabeledPrice' array breakdown (price, tax, discount, delivery, etc)

Optional

  • message_thread_id ; id of the target thread of the forum.
  • max_tip_amount ; integer of max tip accepted. US $1.45 = 145.
  • suggested_tip_amounts ; json serialized array of integer tip amounts, 4 max suggested tips, positive numbers, increasing order, and must not exceed max_tip_amount.
  • start_parameter ; 'deep-linking' start param
  • provider_data ; json data about invoice, payment provider specific
  • photo_url ; product photo for the invoice
  • photo_size ; size in bytes
  • photo_width ; width
  • photo_height ; height
  • need_name ; true if the user's full name is required for order
  • need_phone_number ; true if the user's phone number is required for order
  • need_email ; true if the user's email is required for order
  • need_shipping_address ; true if the user's address is required for order
  • send_phone_number_to_provider ; true to send phone number to provider
  • send_email_to_provider ; true to send email to provider
  • is_flexible ; true if final price depends on shipping method
  • disable_notification ; send message silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; inline keyboard markup
Use this method to send invoices.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; id for the target private chat
- title ; product name
- description ; product description
- payload ; internal bot defined invoice payload
- provider_token ; payments provider token
- currency ; three letter ISO 4217 currency code
- prices ; 'LabeledPrice' array breakdown (price, tax, discount, delivery, etc)

Optional
- message_thread_id ; id of the target thread of the forum.
- max_tip_amount ; integer of max tip accepted. US $1.45 = 145.
- suggested_tip_amounts ; json serialized array of integer tip amounts, 4 max suggested tips,
  positive numbers, increasing order, and must not exceed max_tip_amount.
- start_parameter ; 'deep-linking' start param
- provider_data ; json data about invoice, payment provider specific
- photo_url ; product photo for the invoice
- photo_size ; size in bytes
- photo_width ; width
- photo_height ; height
- need_name ; true if the user's full name is required for order
- need_phone_number ; true if the user's phone number is required for order
- need_email ; true if the user's email is required for order
- need_shipping_address ; true if the user's address is required for order
- send_phone_number_to_provider ; true to send phone number to provider
- send_email_to_provider ; true to send email to provider
- is_flexible ; true if final price depends on shipping method
- disable_notification ; send message silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; inline keyboard markup
sourceraw docstring

send-locationclj

(send-location this content)
(send-location this chat_id latitude longitude)
(send-location this chat_id latitude longitude & optional)

Use this method to send point on the map. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • latitude ; lat of location
  • longitude ; long of location

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • horizontal_accuracy ; 1-1500 meters radius of uncertainty
  • live_period ; seconds for which location will be updated (60-86400)
  • heading ; 1-360 degrees direction user is moving
  • proximity_alert_radius ; 1-100000 meters max distance for proximity alerts
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send point on the map.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- latitude ; lat of location
- longitude ; long of location

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- horizontal_accuracy ; 1-1500 meters radius of uncertainty
- live_period ; seconds for which location will be updated (60-86400)
- heading ; 1-360 degrees direction user is moving
- proximity_alert_radius ; 1-100000 meters max distance for proximity alerts
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-media-groupclj

(send-media-group this content)
(send-media-group this chat_id media)
(send-media-group this chat_id media & optional)

Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • media ; json array describing photos/videos to be sent

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
Use this method to send a group of photos or videos as an album.
On success, an array of the sent Messages is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- media ; json array describing photos/videos to be sent

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
sourceraw docstring

send-messageclj

(send-message this content)
(send-message this chat_id text)
(send-message this chat_id text & optional)

Use this method to send text messages. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • text ; message to send

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • parse_mode ; entity parsing in message
  • entities ; list of MessageEntity - can use instead of parse_mode
  • link_preview_options ; link preview generation options.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send text messages.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- text ; message to send

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- parse_mode ; entity parsing in message
- entities ; list of MessageEntity - can use instead of parse_mode
- link_preview_options ; link preview generation options.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-photoclj

(send-photo this content)
(send-photo this chat_id photo)
(send-photo this chat_id photo & optional)

Use this method to send photos. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • photo ; 'file_id' of photo to send that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • caption ; photo caption
  • parse_mode ; entity parsing in photo caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • has_spoiler ; true if photo needs to be covered with spoiler animation.
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send photos.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- photo ; 'file_id' of photo to send that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- caption ; photo caption
- parse_mode ; entity parsing in photo caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- has_spoiler ; true if photo needs to be covered with spoiler animation.
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-pollclj

(send-poll this content)
(send-poll this chat_id question options)
(send-poll this chat_id question options & optional)

Use this method to send a native poll. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • question ; poll question
  • options ; array/list of answer options

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • is_anonymous ; true if poll is anonymous
  • type ; 'quiz' or 'regular' (default: regular)
  • allows_multiple_answers ; true poll allows multiple answers
  • correct_option_id ; 0-based id of correct answer. Required for quiz mode
  • explanation ; shown when user chooses incorrect answer
  • explanation_parse_mode ; parsing entities in explanation
  • explanation_entities ; list of MessageEntity - can use instead of parse_mode
  • open_period ; 5-600 seconds - time poll will be active
  • close_date ; unix timestamp when poll will be auto closed (5-600 secs in future)
  • is_closed ; true if poll needs to be immediately closed
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send a native poll.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- question ; poll question
- options ; array/list of answer options

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- is_anonymous ; true if poll is anonymous
- type ; 'quiz' or 'regular' (default: regular)
- allows_multiple_answers ; true poll allows multiple answers
- correct_option_id ; 0-based id of correct answer. Required for quiz mode
- explanation ; shown when user chooses incorrect answer
- explanation_parse_mode ; parsing entities in explanation
- explanation_entities ; list of MessageEntity - can use instead of parse_mode
- open_period ; 5-600 seconds - time poll will be active
- close_date ; unix timestamp when poll will be auto closed (5-600 secs in future)
- is_closed ; true if poll needs to be immediately closed
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-stickerclj

(send-sticker this content)
(send-sticker this chat_id sticker)
(send-sticker this chat_id sticker & optional)

Use this method to send static .WEBP or animated .TGS stickers. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • sticker ; sticker to send, file_id for existing on Telegram servers

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • emoji ; Emoji associated with the recently uploaded sticker.
  • disable_notification ; true to send message silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send static .WEBP or animated .TGS stickers.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- sticker ; sticker to send, file_id for existing on Telegram servers

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- emoji ; Emoji associated with the recently uploaded sticker.
- disable_notification ; true to send message silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-venueclj

(send-venue this content)
(send-venue this chat_id latitude longitude title address)
(send-venue this chat_id latitude longitude title address & optional)

Use this method to send information about a venue. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • latitude ; lat of venue
  • longitude ; long of venue
  • title ; name of venue
  • address ; address of venue

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • foursquare_id ; foursquare id of venue
  • foursquare_type ; foursquare type of venue
  • google_place_id ; Google Places id of venue
  • google_place_type ; Google Places type of venue
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send information about a venue.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- latitude ; lat of venue
- longitude ; long of venue
- title ; name of venue
- address ; address of venue

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- foursquare_id ; foursquare id of venue
- foursquare_type ; foursquare type of venue
- google_place_id ; Google Places id of venue
- google_place_type ; Google Places type of venue
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-videoclj

(send-video this content)
(send-video this chat_id video)
(send-video this chat_id video & optional)

Use tffhis method to send video files, Telegram clients support mp4 videos other formats may be sent as Document). On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • video ; 'file_id' of video to send that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • duration ; duration of video in seconds
  • width
  • height
  • caption ; video caption
  • parse_mode ; entity parsing in video caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • has_spoiler ; true if video needs to be covered with spoiler animation.
  • thumbnail ; thumbnail of file sent
  • supports_streaming ; true if uploaded video is ok for streaming
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use tffhis method to send video files, Telegram clients support mp4 videos
other formats may be sent as Document).
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- video ; 'file_id' of video to send that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- duration ; duration of video in seconds
- width
- height
- caption ; video caption
- parse_mode ; entity parsing in video caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- has_spoiler ; true if video needs to be covered with spoiler animation.
- thumbnail ; thumbnail of file sent
- supports_streaming ; true if uploaded video is ok for streaming
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-video-noteclj

(send-video-note this content)
(send-video-note this chat_id video_note)
(send-video-note this chat_id video_note & optional)

Use this method to send video messages. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • video_note ; 'file_id' of video note that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • duration ; duration of video in seconds
  • length ; video width and height
  • thumbnail ; thumbnail of the file sent
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send video messages.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- video_note ; 'file_id' of video note that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- duration ; duration of video in seconds
- length ; video width and height
- thumbnail ; thumbnail of the file sent
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

send-voiceclj

(send-voice this content)
(send-voice this chat_id voice)
(send-voice this chat_id voice & optional)

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • voice ; 'file_id' of audio file that exists on Telegram servers or url

Optional

  • business_connection_id ; Unique id of the business connection.
  • message_thread_id ; id of the target thread of the forum.
  • duration ; duration of voice message in seconds
  • caption ; voice message caption
  • parse_mode ; entity parsing in voice message caption
  • caption_entities ; list of MessageEntity - can use instead of parse_mode
  • disable_notification ; send silently
  • protect_content ; protect content from forwarding/saving
  • reply_parameters ; Description of the message to reply to
  • reply_markup ; additional interface options
Use this method to send audio files, if you want Telegram clients to
display the file as a playable voice message. For this to work, your
audio must be in an .OGG file encoded with OPUS (other formats may be
sent as Audio or Document).
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- voice ; 'file_id' of audio file that exists on Telegram servers or url

Optional
- business_connection_id ; Unique id of the business connection.
- message_thread_id ; id of the target thread of the forum.
- duration ; duration of voice message in seconds
- caption ; voice message caption
- parse_mode ; entity parsing in voice message caption
- caption_entities ; list of MessageEntity - can use instead of parse_mode
- disable_notification ; send silently
- protect_content ; protect content from forwarding/saving
- reply_parameters ; Description of the message to reply to
- reply_markup ; additional interface options
sourceraw docstring

set-chat-administrator-custom-titleclj

(set-chat-administrator-custom-title this content)
(set-chat-administrator-custom-title this chat_id user_id custom_title)

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user
  • custom_title ; new custom title for the admin
Use this method to set a custom title for an administrator in a supergroup
promoted by the bot.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user
- custom_title ; new custom title for the admin
sourceraw docstring

set-chat-descriptionclj

(set-chat-description this content)
(set-chat-description this chat_id description)

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • description ; new chat description
Use this method to change the description of a group, a supergroup or a channel.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- description ; new chat description
sourceraw docstring

set-chat-menu-buttonclj

(set-chat-menu-button this)
(set-chat-menu-button this content)

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.

Required

  • this ; a bot instance

Optional

  • chat_id ; target chat or username (@user)
  • menu_button ; A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault.
Use this method to change the bot's menu button in a private chat, or the default menu button.
Returns True on success.

Required
- this ; a bot instance

Optional
- chat_id ; target chat or username (@user)
- menu_button ; A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault.
sourceraw docstring

set-chat-permissionsclj

(set-chat-permissions this content)
(set-chat-permissions this chat_id permissions)
(set-chat-permissions this chat_id permissions & optional)

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • permissions ; new default chat permissions

Optional

  • use_independent_chat_permissions ; True if chat permissions are set independently. Otherwise, some permissions imply others.
Use this method to set default chat permissions for all members.
The bot must be an administrator in the group or a supergroup for this to work
and must have the can_restrict_members admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- permissions ; new default chat permissions

Optional
- use_independent_chat_permissions ; True if chat permissions are set independently.
                                     Otherwise, some permissions imply others.
sourceraw docstring

set-chat-photoclj

(set-chat-photo this content)
(set-chat-photo this chat_id photo)

Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • photo ; new chat photo
Use this method to set a new profile photo for the chat.
Photos can't be changed for private chats.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- photo ; new chat photo
sourceraw docstring

set-chat-sticker-setclj

(set-chat-sticker-set this content)
(set-chat-sticker-set this chat_id sticker_set_name)

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • sticker_set_name ; name of sticker set
Use this method to set a new group sticker set for a supergroup.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Use the field can_set_sticker_set optionally returned in getChat requests to
check if the bot can use this method.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- sticker_set_name ; name of sticker set
sourceraw docstring

set-chat-titleclj

(set-chat-title this content)
(set-chat-title this chat_id title)

Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • title ; new chat title
Use this method to change the title of a chat.
Titles can't be changed for private chats.
The bot must be an administrator in the chat for this to work and
must have the appropriate admin rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- title ; new chat title
sourceraw docstring

set-custom-emoji-sticker-set-thumbnailcljmultimethod

Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.

Required

  • this ; a bot instance
  • name ; Sticker set name.

Optional

  • custom_emoji_id ; Emoji ID of a sticker from the sticker set. Empty string to drop the thumbnail and use the first sticker as the thumbnail.
Use this method to set the thumbnail of a custom emoji sticker set.
Returns True on success.

Required
- this ; a bot instance
- name ; Sticker set name.

Optional
- custom_emoji_id ; Emoji ID of a sticker from the sticker set. Empty string to drop the thumbnail
                    and use the first sticker as the thumbnail.
sourceraw docstring

set-game-scoreclj

(set-game-score this content)
(set-game-score this chat_id message_id user_id score)
(set-game-score this chat_id message_id user_id score & optional)

Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Required

  • this ; a bot instance
  • chat_id ; id of target chat
  • message_id ; id of the sent message
  • user_id ; user identifier
  • score ; new score, non-negative

Optional

  • force ; true if high score is allowed to decrease
  • disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
Use this method to set the score of the specified user in a game.
On success, if the message was sent by the bot, returns the edited Message,
otherwise returns True. Returns an error, if the new score is not greater
than the user's current score in the chat and force is False.

Required
- this ; a bot instance
- chat_id ; id of target chat
- message_id ; id of the sent message
- user_id ; user identifier
- score ; new score, non-negative

Optional
- force ; true if high score is allowed to decrease
- disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
sourceraw docstring

set-game-score-inlineclj

(set-game-score-inline this content)
(set-game-score-inline this inline_message_id user_id score)
(set-game-score-inline this inline_message_id user_id score & optional)

Use this method to set the inline score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • user_id ; user identifier
  • score ; new score, non-negative

Optional

  • force ; true if high score is allowed to decrease
  • disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
Use this method to set the inline score of the specified user in a game.
On success, if the message was sent by the bot, returns the edited Message,
otherwise returns True. Returns an error, if the new score is not greater
than the user's current score in the chat and force is False.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- user_id ; user identifier
- score ; new score, non-negative

Optional
- force ; true if high score is allowed to decrease
- disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
sourceraw docstring

set-message-reactionclj

(set-message-reaction this content)
(set-message-reaction this chat_id message_id)
(set-message-reaction this chat_id message_id & optional)

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; ID of the target message.

Optional

  • reaction ; List of ReactionType's to set.
  • is_big ; Pass True to set the reaction with a big animation.
Use this method to change the chosen reactions on a message.
Service messages can't be reacted to.
Automatically forwarded messages from a channel to its discussion group
have the same available reactions as messages in the channel.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; ID of the target message.

Optional
- reaction ; List of ReactionType's to set.
- is_big ; Pass True to set the reaction with a big animation.
sourceraw docstring

set-my-commandscljmultimethod

Use this method to change the list of the bot's commands. Returns True on success.

Required

  • this ; a bot instance
  • commands ; json array/list of 'BotCommand'

Optional

  • scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
  • language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
Use this method to change the list of the bot's commands.
Returns True on success.

Required
- this ; a bot instance
- commands ; json array/list of 'BotCommand'

Optional
- scope ; JSON object, scope of users that commands are relevant for. (default: BotCommandScopeDefault)
- language_code ; Two-letter ISO 639-1 lang code. If empty, commands applied to all users from given scope.
sourceraw docstring

set-my-default-administrator-rightsclj

(set-my-default-administrator-rights this)
(set-my-default-administrator-rights this content)

Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.

Required

  • this ; a bot instance

Optional

  • rights ; A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.
  • for_channels ; Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.
Use this method to change the default administrator rights requested by the bot when it's added
as an administrator to groups or channels.
These rights will be suggested to users, but they are are free to modify the list before adding the bot.
Returns True on success.

Required
- this ; a bot instance

Optional
- rights ; A JSON-serialized object describing new default administrator rights.
           If not specified, the default administrator rights will be cleared.
- for_channels ; Pass True to change the default administrator rights of the bot in channels.
                 Otherwise, the default administrator rights of the bot for groups and
                 supergroups will be changed.
sourceraw docstring

set-my-descriptionclj

(set-my-description this)
(set-my-description this content)

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.

Required

  • this ; a bot instance

Optional

  • description ; New bot description. Pass empty string to remove description.
  • language_code ; Two-letter ISO 639-1 lang code. If empty, description applied to all users.
Use this method to change the bot's description,
which is shown in the chat with the bot if the chat is empty.
Returns True on success.

Required
- this ; a bot instance

Optional
- description ; New bot description. Pass empty string to remove description.
- language_code ; Two-letter ISO 639-1 lang code. If empty, description applied to all users.
sourceraw docstring

set-my-nameclj

(set-my-name this)
(set-my-name this content)

Use this method to change the bot's name. Returns True on success.

Required

  • this ; a bot instance

Optional

  • name ; New bot name. Pass an empty string to remove the name.
  • language_code ; Two-letter ISO 639-1 lang code. If empty, name applied to all users.
Use this method to change the bot's name.
Returns True on success.

Required
- this ; a bot instance

Optional
- name ; New bot name. Pass an empty string to remove the name.
- language_code ; Two-letter ISO 639-1 lang code. If empty, name applied to all users.
sourceraw docstring

set-my-short-descriptionclj

(set-my-short-description this)
(set-my-short-description this content)

Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.

Required

  • this ; a bot instance

Optional

  • short_description ; New bot short description. Pass empty string to remove description.
  • language_code ; Two-letter ISO 639-1 lang code. If empty, description applied to all users.
Use this method to change the bot's short description,
which is shown on the bot's profile page and is sent together
with the link when users share the bot.
Returns True on success.

Required
- this ; a bot instance

Optional
- short_description ; New bot short description. Pass empty string to remove description.
- language_code ; Two-letter ISO 639-1 lang code. If empty, description applied to all users.
sourceraw docstring

set-passport-data-errorsclj

(set-passport-data-errors this content)
(set-passport-data-errors this user_id errors)

Informs a user that some of the Telegram Passport elements they provided contains errors.

Required

  • this ; a bot instance
  • user_id ; user identifier
  • errors ; json array of 'PassportElementError' describing the errors
Informs a user that some of the Telegram Passport elements they provided contains errors.

Required
- this ; a bot instance
- user_id ; user identifier
- errors ; json array of 'PassportElementError' describing the errors
sourceraw docstring

set-sticker-emoji-listclj

(set-sticker-emoji-list this content)
(set-sticker-emoji-list this sticker emoji_list)

Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

Required

  • this ; a bot instance
  • sticker ; File id of the sticker.
  • emoji_list ; A JSON-serialized list of 1-20 emoji associated with the sticker.
Use this method to change the list of emoji assigned to a regular or custom emoji sticker.
The sticker must belong to a sticker set created by the bot.
Returns True on success.

Required
- this ; a bot instance
- sticker ; File id of the sticker.
- emoji_list ; A JSON-serialized list of 1-20 emoji associated with the sticker.
sourceraw docstring

set-sticker-keywordscljmultimethod

Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

Required

  • this ; a bot instance
  • sticker ; File id of the sticker.

Optional

  • keywords ; A JSON-serialized list of 0-20 search keywords for the sticker.
Use this method to change search keywords assigned to a regular or custom emoji sticker.
The sticker must belong to a sticker set created by the bot.
Returns True on success.

Required
- this ; a bot instance
- sticker ; File id of the sticker.

Optional
- keywords ; A JSON-serialized list of 0-20 search keywords for the sticker.
sourceraw docstring

set-sticker-mask-positioncljmultimethod

Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.

Required

  • this ; a bot instance
  • sticker ; File id of the sticker.

Optional

  • mask_position ; A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.
Use this method to change the mask position of a mask sticker.
The sticker must belong to a sticker set that was created by the bot.
Returns True on success.

Required
- this ; a bot instance
- sticker ; File id of the sticker.

Optional
- mask_position ; A JSON-serialized object with the position where the mask should be placed on faces.
                  Omit the parameter to remove the mask position.
sourceraw docstring

set-sticker-position-in-setclj

(set-sticker-position-in-set this content)
(set-sticker-position-in-set this sticker position)

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

Required

  • this ; a bot instance
  • sticker ; file id of the sticker
  • position ; new sticker position in the set
Use this method to move a sticker in a set created by the bot to
a specific position.
Returns True on success.

Required
- this ; a bot instance
- sticker ; file id of the sticker
- position ; new sticker position in the set
sourceraw docstring

set-sticker-set-thumbcljdeprecated

(set-sticker-set-thumb this content)
(set-sticker-set-thumb this name user_id)
(set-sticker-set-thumb this name user_id & optional)

DEPRECATED: Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.

Required

  • this ; a bot instance
  • name ; sticker set name
  • user_id ; id of the sticker set owner

Optional

DEPRECATED: Use this method to set the thumbnail of a regular or mask sticker set.
The format of the thumbnail file must match the format of the stickers in the set.
Returns True on success.

Required
- this ; a bot instance
- name ; sticker set name
- user_id ; id of the sticker set owner

Optional
- thumbnail ; A .WEBP or .PNG image with the thumbnail, or .TGS animation, or WEBM video.
              More information: https://core.telegram.org/bots/api#sending-files
sourceraw docstring

set-sticker-set-thumbnailclj

(set-sticker-set-thumbnail this content)
(set-sticker-set-thumbnail this name user_id format)
(set-sticker-set-thumbnail this name user_id format & optional)

Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.

Required

  • this ; a bot instance
  • name ; sticker set name
  • user_id ; id of the sticker set owner
  • format ; Format of the thumbnail: static, animated, or video.

Optional

Use this method to set the thumbnail of a regular or mask sticker set.
The format of the thumbnail file must match the format of the stickers in the set.
Returns True on success.

Required
- this ; a bot instance
- name ; sticker set name
- user_id ; id of the sticker set owner
- format ; Format of the thumbnail: static, animated, or video.

Optional
- thumbnail ; A .WEBP or .PNG image with the thumbnail, or .TGS animation, or WEBM video.
              More information: https://core.telegram.org/bots/api#sending-files
sourceraw docstring

set-sticker-set-titleclj

(set-sticker-set-title this content)
(set-sticker-set-title this name title)

Use this method to set the title of a created sticker set. Returns True on success.

Required

  • this ; a bot instance
  • name ; Sticker set name.
  • title ; Sticker set title.
Use this method to set the title of a created sticker set.
Returns True on success.

Required
- this ; a bot instance
- name ; Sticker set name.
- title ; Sticker set title.
sourceraw docstring

set-webhookcljmultimethod

Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.

Required

  • this ; a bot instance
  • url ; https url to send updates to. empty string to remove webhook

Optional

  • certificate ; upload public key cert
  • ip_address ; use this IP instead of resolving URL in DNS
  • max_connections ; max allowed simultaneous https connections for updates. (1-100) default: 40
  • allowed_updates ; json array of update types bot will receive
  • drop_pending_updates ; Pass True to drop all pending updates
  • secret_token ; 1-256 chars. Sent in header (X-Telegram-Bot-Api-Secret-Token) to ensure request comes from your webhook.
Use this method to specify a url and receive incoming updates via
an outgoing webhook. Whenever there is an update for the bot, we
will send an HTTPS POST request to the specified url, containing
a JSON-serialized Update. In case of an unsuccessful request, we
will give up after a reasonable amount of attempts.
Returns True on success.

Required
- this ; a bot instance
- url ; https url to send updates to. empty string to remove webhook

Optional
- certificate ; upload public key cert
- ip_address ; use this IP instead of resolving URL in DNS
- max_connections ; max allowed simultaneous https connections for updates. (1-100) default: 40
- allowed_updates ; json array of update types bot will receive
- drop_pending_updates ; Pass True to drop all pending updates
- secret_token ; 1-256 chars. Sent in header (X-Telegram-Bot-Api-Secret-Token)
                 to ensure request comes from your webhook.
sourceraw docstring

stop-message-live-locationclj

(stop-message-live-location this content)
(stop-message-live-location this chat_id message_id)
(stop-message-live-location this chat_id message_id & optional)

Use this method to stop updating a live location message before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of the message to edit

Optional

  • reply_markup ; additional interface options
Use this method to stop updating a live location message before live_period expires.
On success, if the message was sent by the bot, the sent
Message is returned, otherwise True is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of the message to edit

Optional
- reply_markup ; additional interface options
sourceraw docstring

stop-message-live-location-inlinecljmultimethod

Use this method to stop updating a live location inline message before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message to edit

Optional

  • reply_markup ; additional interface options
Use this method to stop updating a live location inline message before
live_period expires.
On success, if the message was sent by the bot, the sent
Message is returned, otherwise True is returned.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message to edit

Optional
- reply_markup ; additional interface options
sourceraw docstring

stop-pollclj

(stop-poll this content)
(stop-poll this chat_id message_id)
(stop-poll this chat_id message_id & optional)

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_id ; id of original message with the poll

Optional

  • reply_markup ; inline keyboard markup
Use this method to stop a poll which was sent by the bot.
On success, the stopped Poll with the final results is returned.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_id ; id of original message with the poll

Optional
- reply_markup ; inline keyboard markup
sourceraw docstring

unban-chat-memberclj

(unban-chat-member this content)
(unban-chat-member this chat_id user_id)
(unban-chat-member this chat_id user_id & optional)

Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • user_id ; id of target user

Optional

  • only_if_banned ; Do nothing if the user is not banned
Use this method to unban a previously kicked user in a supergroup or channel.
The user will not return to the group or channel automatically, but will be able
to join via link, etc. The bot must be an administrator for this to work.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- user_id ; id of target user

Optional
- only_if_banned ; Do nothing if the user is not banned
sourceraw docstring

unban-chat-sender-chatclj

(unban-chat-sender-chat this content)
(unban-chat-sender-chat this chat_id sender_chat_id)

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • sender_chat_id ; target sender chat
Use this method to unban a previously banned channel chat in a supergroup or channel.
The bot must be an administrator for this to work and must have the appropriate administrator rights.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- sender_chat_id ; target sender chat
sourceraw docstring

unhide-general-forum-topiccljmultimethod

Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
Use this method to unhide the 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have
the can_manage_topics administrator rights.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
sourceraw docstring

unpin-all-chat-messagescljmultimethod

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
Use this method to clear the list of pinned messages in a chat.
If the chat is not a private chat, the bot must be an administrator in
the chat for this to work and must have the 'can_pin_messages' admin
right in a supergroup or 'can_edit_messages' admin right in a channel.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
sourceraw docstring

unpin-all-forum-topic-messagesclj

(unpin-all-forum-topic-messages this content)
(unpin-all-forum-topic-messages this chat_id message_thread_id)

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)
  • message_thread_id ; id of the target thread of the forum.
Use this method to clear the list of pinned messages in a forum topic.
The bot must be an administrator in the chat for this to work and
must have the can_pin_messages administrator right in the supergroup.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)
- message_thread_id ; id of the target thread of the forum.
sourceraw docstring

unpin-all-general-forum-topic-messagescljmultimethod

Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

Required

  • this ; A bot instance.
  • chat_id ; Target chat or username of supergroup (@user).
Use this method to clear the list of pinned messages in a General forum topic.
The bot must be an administrator in the chat for this to work and
must have the can_pin_messages administrator right in the supergroup.
Returns True on success.

Required
- this ; A bot instance.
- chat_id ; Target chat or username of supergroup (@user).
sourceraw docstring

unpin-chat-messagecljmultimethod

Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. Returns True on success.

Required

  • this ; a bot instance
  • chat_id ; target chat or username (@user)

Optional

  • message_id ; id of message to unpin (unpins most recent if not specified)
Use this method to unpin a message in a group, a supergroup, or a channel.
The bot must be an administrator in the chat for this to work and
must have the 'can_pin_messages' admin right in the supergroup or
'can_edit_messages' admin right in the channel.
Returns True on success.

Required
- this ; a bot instance
- chat_id ; target chat or username (@user)

Optional
- message_id ; id of message to unpin (unpins most recent if not specified)
sourceraw docstring

upload-sticker-fileclj

(upload-sticker-file this content)
(upload-sticker-file this user_id sticker sticker_format)

Use this method to upload a .PNG file with a sticker for later use in create-new-sticker-set and add-sticker-to-set methods (can be used multiple times). Returns the uploaded File on success.

Required

  • this ; a bot instance
  • user_id ; id of sticker file owner
  • sticker ; A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements.
  • sticker_format ; Format of sticker, 'static', 'animated', or 'video'.
Use this method to upload a .PNG file with a sticker for later use
in create-new-sticker-set and add-sticker-to-set methods (can be used multiple times).
Returns the uploaded File on success.

Required
- this ; a bot instance
- user_id ; id of sticker file owner
- sticker ; A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format.
            See https://core.telegram.org/stickers for technical requirements.
- sticker_format ; Format of sticker, 'static', 'animated', or 'video'.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close