Skip to content

Instantly share code, notes, and snippets.

@Sea-n
Last active March 8, 2024 22:23
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Sea-n/aacf84e85230a57778076eb6c3d98072 to your computer and use it in GitHub Desktop.
Save Sea-n/aacf84e85230a57778076eb6c3d98072 to your computer and use it in GitHub Desktop.
Translate Guide for Awesome Telegram Bot

Help Translate this application

Make Telegram World Better!

Required

  1. Fork this gist (If you don't have GitHub account, just skip this step)
  2. Translate Play Store listing (Title and Description)
  3. Please come here to translate/improve translations.

Optional

  1. About section in this app (5. about.json)
  2. API Methods and params description (6. api-methods-en.json)

Submit Your Translate

  1. Fork this gist
  2. Translate them
  3. Send your gist to developer
  4. Give me your name and website link, which listed in Translators

Translators

Spanish 🇪🇸 by Chaky El Pipe
Russian 🇷🇺 by Smartman_ru
Hindi 🇮🇳 by Rishabh
Italian 🇮🇹 by Eric Solinas
Chinese 🇹🇼 by Sean

Improve Transltes

If your native language already translted, but have typo or not complete enough, you can submit update

Android in-App strings

It is in res directory, you will see values-XX directory, e.g. values-es, values-ru. (values for English)
There is strings.xml file in values-XX directory.

If you know how to work with GitHub, just submit Pull Request, don't forget to ping me in Telegram.
If you didn't use GitHub before, you can let me know where can be improve.

Google Play store listing

Just let me know :P

API methods description

All translates are write in assets directory.
Find api-methods-XX.json file for Bot API.

You need English strings in this gist, because I will remove untranslated JSON.

Rules

  1. Make translate native, you won't want to see machine translate.
  2. Be happy to translate
  3. Promote your work to your friends

Links

Features:
+ Automatic completion for full API method
+ Automatic completion of the parameters
+ Quickly switch between different Bot
* No advertisement
Open Source on GitHub: https://git.io/TG
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Last update: v3.5.4 (63) -->
<string name="app_name">Awesome Telegram Bot</string>
<string name="lang_code">en</string>
<string name="menu_account">Accounts</string>
<string name="menu_functions">Functions</string>
<string name="menu_add_bot">Add Bot</string>
<string name="menu_join_group">Join Group</string>
<string name="menu_github">Star on GitHub</string>
<string name="menu_export">Export Database to SD Card</string>
<string name="menu_about">About</string>
<string name="title_activity_add_bot">New Bot</string>
<string name="title_activity_bot_api">Bot API</string>
<string name="title_activity_telegraph">Telegraph</string>
<string name="title_activity_webhook">Webhook Debugger</string>
<string name="title_activity_settings">Settings</string>
<string name="title_activity_favorite">Favorites</string>
<string name="title_activity_add_favorite">Add Favorite</string>
<string name="title_activity_about">About This App</string>
<string name="no_bot_placeholder">No Bot yet, please click + to add one.</string>
<string name="not_normal_bot">Please use Normal Bot Token</string>
<string name="add_bot_token">Your Bot Token</string>
<string name="add_bot_name">Nickname</string>
<string name="bot_info">Bot Info</string>
<string name="add_bot_description">Please obtain Token via https://t.me/BotFather</string>
<string name="add_bot_name_invalid">Nickname Invalid, please check again.</string>
<string name="add_bot_token_invalid">Token format invalid</string>
<string name="token_unauthorized">This Bot Token seems to BROKEN, please edit or remove this.</string>
<string name="no_bot_warning">Didn\'t select bot token, please add one first.</string>
<string name="no_bot_selected">You didn\'t select your bot.</string>
<string name="ask_add_bot_title">New Bot</string>
<string name="ask_add_bot_msg">Do you want to add new bot?</string>
<string name="del_bot_confirm_title">Delete Bot</string>
<string name="del_bot_confirm_msg">Are you sure you want to delete this bot?</string>
<string name="field_required">This field is required.</string>
<string name="no_context_yet">No Context Yet.</string>
<string name="powered_by">Powered by Awesome Telegram Bot</string>
<string name="param_out_of_range">Number must in range %1$d - %2$d.</string>
<string name="paload">Payload</string>
<string name="webhook_url">Webhook URL</string>
<string name="file_downloader">File Downloader</string>
<string name="file_id">File ID</string>
<string name="file_downloader_description">File will automatically open when download complete.\nAll Downloaded File will Storaged in /sdcard/TeleBot Directory.</string>
<string name="add_fav_prompt">Select kind</string>
<string name="add_fav_value_hint">Your Data</string>
<string name="add_fav_name_hint">Kindly Name</string>
<string name="setting_sharing">Sharing Options</string>
<string name="setting_upload">Upload to Sharing Platform</string>
<string name="setting_upload_description">It will generate URL of request, in order to prevent spam, this will send your token for verifying.</string>
<string name="setting_screenshot">Screenshot</string>
<string name="setting_screenshot_description">Screenshots will be saved in /sdcard/TeleBot, may be an empty image in some old device due to the out-of-memory problem.</string>
<string name="setting_copy">Auto Copy Option</string>
<string name="setting_share">Pop-up Share Chooser</string>
<string-array name="setting_copy_options">
<item>Only URL (Recommended)</item>
<item>URL and Request JSON</item>
<item>Nothing</item>
</string-array>
<string-array name="setting_share_options">
<item>URL</item>
<item>Photo</item>
<item>Photo with URL as caption</item>
<item>Nothing</item>
</string-array>
<string name="save_db">Save Databases</string>
<string name="mkdir_fail">Fail to create backup director</string>
<string name="db_export_fail">Database export fail\nReason:</string>
<string name="export_to">"Exported to "</string>
<string name="footer_rate_title">Rate this Application</string>
<string name="footer_rate_msg">Click GO if you like it :)</string>
<string name="footer_rate_yes">GO</string>
<string name="footer_rate_no">Not now</string>
<string name="method">Method</string>
<string name="done">Done</string>
<string name="save">Save</string>
<string name="copy">Copy</string>
<string name="submit">Submit</string>
<string name="cancel">Cancel</string>
<string name="edit">Edit</string>
<string name="remove">Remove</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="share">Share</string>
<string name="screenshot">Screenshot</string>
<string name="request">Request</string>
<string name="response">Response</string>
<string name="copy_request">Copy Request</string>
<string name="copy_response">Copy Response</string>
</resources>
[
{
"title": "Main developer",
"desc": "Sean",
"url": "https://www.sean.taipei/"
},
{
"header": true,
"title": "Translators"
},
{
"title": "Spanish 🇪🇸",
"desc": "Chaky El Pipe",
"url": "http://telegra.ph/Biografía-Chaky-El-Pipe-07-24"
},
{
"title": "Russian 🇷🇺",
"desc": "Smartman_ru",
"url": "https://github.com/smartmanru"
},
{
"title": "Hindi 🇮🇳",
"desc": "Rishabh",
"url": "https://github.com/lulzx"
},
{
"title": "Italian 🇮🇹",
"desc": "Eric Solinas",
"url": "https://t.me/EricSolinas"
},
{
"title": "Chinese 🇹🇼",
"desc": "Sean",
"url": "https://www.sean.taipei"
},
{
"title": "Become Translator",
"desc": "Make your native language have built-in translate!",
"url": "https://git.io/l10n"
},
{
"header": true,
"title": "misc"
},
{
"title": "Rate us",
"desc": "If you like it :)",
"url": "https://play.google.com/store/apps/details?id=taipei.sean.telegram.botplayground"
},
{
"title": "Official Chat Room",
"desc": "Please use English in global group",
"url": "https://t.me/AwesomeTeleBot"
},
{
"title": "Open Source on GitHub",
"desc": "Sea-n/Android-TG-Bot",
"url": "https://git.io/TG"
}
]
{
"getUpdates": {
"description": "Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.",
"params": {
"offset": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an __offset__ higher than its __update_id__. The negative offset can be specified to retrieve updates starting from __-offset__ update from the end of the updates queue. All previous updates will forgotten.",
"limit": "Limits the number of updates to be retrieved.",
"timeout": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.",
"allowed_updates": "List the types of updates you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time."
}
},
"setWebhook": {
"description": "If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. `https://www.example.com/<token>`. Since nobody else knows your bot‘s token, you can be pretty sure it’s us.",
"params": {
"url": "HTTPS url to send updates to. Use an empty string to remove webhook integration",
"certificate": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.",
"max_connections": "Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery. Use lower values to limit the load on your bot‘s server, and higher values to increase your bot’s throughput.",
"allowed_updates": "List the types of updates you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time."
}
},
"deleteWebhook": {
"description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns __True__ on success. Requires no parameters."
},
"getWebhookInfo": {
"description": "Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the __url__ field empty."
},
"getMe": {
"description": "A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object."
},
"sendMessage": {
"description": "Use this method to send text messages. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"text": "Text of the message to be sent",
"parse_mode": "Send __Markdown__ or __HTML__, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.",
"disable_web_page_preview": "Disables link previews for links in this message",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"forwardMessage": {
"description": "Use this method to forward messages of any kind. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"from_chat_id": "Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`)",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"message_id": "Message identifier in the chat specified in __from_chat_id__"
}
},
"sendPhoto": {
"description": "Use this method to send photos. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"photo": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. More info on Sending Files »",
"caption": "Photo caption (may also be used when resending photos by __file_id__).",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendAudio": {
"description": "For sending voice messages, use the sendVoice method instead.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"audio": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"caption": "Audio caption",
"duration": "Duration of the audio in seconds",
"performer": "Performer",
"title": "Track name",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendDocument": {
"description": "Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"document": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"caption": "Document caption (may also be used when resending documents by __file_id__).",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendVideo": {
"description": "Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"video": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. More info on Sending Files »",
"duration": "Duration of sent video in seconds",
"width": "Video width",
"height": "Video height",
"caption": "Video caption (may also be used when resending videos by __file_id__).",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendVoice": {
"description": "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. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"voice": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"caption": "Voice message caption.",
"duration": "Duration of the voice message in seconds",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendVideoNote": {
"description": "As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"video_note": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. More info on Sending Files ». Sending video notes by a URL is currently unsupported",
"duration": "Duration of sent video in seconds",
"length": "Video width and height",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendMediaGroup": {
"description": "Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"media": "A JSON-serialized array describing photos and videos to be sent, must include 1–10 items",
"disable_notification": "Sends the messages silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the messages are a reply, ID of the original message"
}
},
"sendLocation": {
"description": "Use this method to send point on the map. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"latitude": "Latitude of location",
"longitude": "Longitude of location",
"live_period": "Period in seconds for which the location will be updated.",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"editMessageLiveLocation": {
"description": "Use this method to edit live location messages sent by the bot or via the bot (for inline bots). 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.",
"params": {
"chat_id": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"message_id": "Required if inline_message_id is not specified. Identifier of the sent message",
"inline_message_id": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"latitude": "Latitude of new location",
"longitude": "Longitude of new location",
"reply_markup": "A JSON-serialized object for a new inline keyboard."
}
},
"stopMessageLiveLocation": {
"description": "Use this method to stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.",
"params": {
"chat_id": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"message_id": "Required if inline_message_id is not specified. Identifier of the sent message",
"inline_message_id": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"reply_markup": "A JSON-serialized object for a new inline keyboard."
}
},
"sendVenue": {
"description": "Use this method to send information about a venue. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"latitude": "Latitude of the venue",
"longitude": "Longitude of the venue",
"title": "Name of the venue",
"address": "Address of the venue",
"foursquare_id": "Foursquare identifier of the venue",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"sendContact": {
"description": "Use this method to send phone contacts. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"phone_number": "Contact's phone number",
"first_name": "Contact's first name",
"last_name": "Contact's last name",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user."
}
},
"sendChatAction": {
"description": "We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"action": "Type of action to broadcast. Choose one, depending on what the user is about to receive: __typing__ for text messages, __upload_photo__ for photos, __record_video__ or __upload_video__ for videos, __record_audio__ or __upload_audio__ for audio files, __upload_document__ for general files, __find_location__ for location data, __record_video_note__ or __upload_video_note__ for video notes."
}
},
"getUserProfilePhotos": {
"description": "Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.",
"params": {
"user_id": "Unique identifier of the target user",
"offset": "Sequential number of the first photo to be returned. By default, all photos are returned.",
"limit": "Limits the number of photos to be retrieved."
}
},
"getFile": {
"description": "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.",
"params": {
"file_id": "File identifier to get info about"
}
},
"kickChatMember": {
"params": {
"chat_id": "Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`)",
"user_id": "Unique identifier of the target user",
"until_date": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever"
}
},
"unbanChatMember": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`)",
"user_id": "Unique identifier of the target user"
}
},
"restrictChatMember": {
"description": "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 boolean parameters to lift restrictions from a user. Returns __True__ on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`)",
"user_id": "Unique identifier of the target user",
"until_date": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever",
"can_send_messages": "Pass True, if the user can send text messages, contacts, locations and venues",
"can_send_media_messages": "Pass True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages",
"can_send_other_messages": "Pass True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages",
"can_add_web_page_previews": "Pass True, if the user may add web page previews to their messages, implies can_send_media_messages"
}
},
"promoteChatMember": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"user_id": "Unique identifier of the target user",
"can_change_info": "Pass True, if the administrator can change chat title, photo and other settings",
"can_post_messages": "Pass True, if the administrator can create channel posts, channels only",
"can_edit_messages": "Pass True, if the administrator can edit messages of other users, channels only",
"can_delete_messages": "Pass True, if the administrator can delete messages of other users",
"can_invite_users": "Pass True, if the administrator can invite new users to the chat",
"can_restrict_members": "Pass True, if the administrator can restrict, ban or unban chat members",
"can_pin_messages": "Pass True, if the administrator can pin messages, supergroups only",
"can_promote_members": "Pass True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)"
}
},
"exportChatInviteLink": {
"description": "Use this method to export an invite link to 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 exported invite link as __String__ on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"
}
},
"setChatPhoto": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"photo": "New chat photo, uploaded using multipart/form-data"
}
},
"deleteChatPhoto": {
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"
}
},
"setChatTitle": {
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"title": "New chat title."
}
},
"setChatDescription": {
"description": "Use this method to change the description of 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. ",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"description": "New chat description"
}
},
"pinChatMessage": {
"description": "Use this method to pin a message in 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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"message_id": "Identifier of a message to pin",
"disable_notification": "Pass __True__, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels."
}
},
"unpinChatMessage": {
"description": "Use this method to unpin a message in 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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"
}
},
"leaveChat": {
"description": "Use this method for your bot to leave a group, supergroup or channel. Returns __True__ on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`)"
}
},
"getChat": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`)"
}
},
"getChatAdministrators": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`)"
}
},
"getChatMembersCount": {
"description": "Use this method to get the number of members in a chat. Returns __Int__ on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`)"
}
},
"getChatMember": {
"description": "Use this method to get information about a member of a chat. Returns a ChatMember object on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`)",
"user_id": "Unique identifier of the target user"
}
},
"setChatStickerSet": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"sticker_set_name": "Name of the sticker set to be set as the group sticker set"
}
},
"deleteChatStickerSet": {
"description": "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.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)"
}
},
"answerCallbackQuery": {
"params": {
"callback_query_id": "Unique identifier for the query to be answered",
"text": "Text of the notification. If not specified, nothing will be shown to the user.",
"show_alert": "If __true__, an alert will be shown by the client instead of a notification at the top of the chat screen.",
"url": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game – note that this will only work if the query comes from a __callback_game__ button.\nOtherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.",
"cache_time": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0."
}
},
"editMessageText": {
"description": "Use this method to edit text and game messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise __True__ is returned.",
"params": {
"chat_id": "Required if __inline_message_id__ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"message_id": "Required if __inline_message_id__ is not specified. Identifier of the sent message",
"inline_message_id": "Required if __chat_id__ and __message_id__ are not specified. Identifier of the inline message",
"text": "New text of the message",
"parse_mode": "Send __Markdown__ or __HTML__, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.",
"disable_web_page_preview": "Disables link previews for links in this message",
"reply_markup": "A JSON-serialized object for an inline keyboard."
}
},
"editMessageCaption": {
"description": "Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise __True__ is returned.",
"params": {
"chat_id": "Required if __inline_message_id__ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"message_id": "Required if __inline_message_id__ is not specified. Identifier of the sent message",
"inline_message_id": "Required if __chat_id__ and __message_id__ are not specified. Identifier of the inline message",
"caption": "New caption of the message",
"reply_markup": "A JSON-serialized object for an inline keyboard."
}
},
"editMessageReplyMarkup": {
"description": "Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise __True__ is returned.",
"params": {
"chat_id": "Required if __inline_message_id__ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"message_id": "Required if __inline_message_id__ is not specified. Identifier of the sent message",
"inline_message_id": "Required if __chat_id__ and __message_id__ are not specified. Identifier of the inline message",
"reply_markup": "A JSON-serialized object for an inline keyboard."
}
},
"deleteMessage": {
"description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Bots can delete outgoing messages in groups and supergroups.\n- Bots granted __can_post_messages__ permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has __can_delete_messages__ permission in a supergroup or a channel, it can delete any message there.\nReturns __True__ on success.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"message_id": "Identifier of the message to delete"
}
},
"sendSticker": {
"description": "Use this method to send .webp stickers. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)",
"sticker": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .webp file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."
}
},
"getStickerSet": {
"description": "Use this method to get a sticker set. On success, a StickerSet object is returned.",
"params": {
"name": "Name of the sticker set"
}
},
"uploadStickerFile": {
"description": "Use this method to upload a .png file with a sticker for later use in __createNewStickerSet__ and __addStickerToSet__ methods (can be used multiple times). Returns the uploaded File on success.",
"params": {
"user_id": "User identifier of sticker file owner",
"png_sticker": "**Png** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More info on Sending Files »"
}
},
"createNewStickerSet": {
"description": "Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns __True__ on success.",
"params": {
"user_id": "User identifier of created sticker set owner",
"name": "Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., __animals__). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in __“_by_<bot username>”__. __<bot_username>__ is case insensitive.",
"title": "Sticker set title.",
"png_sticker": "**Png** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a __file_id__ as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"emojis": "One or more emoji corresponding to the sticker",
"contains_masks": "Pass __True__, if a set of mask stickers should be created",
"mask_position": "A JSON-serialized object for position where the mask should be placed on faces"
}
},
"addStickerToSet": {
"description": "Use this method to add a new sticker to a set created by the bot. Returns __True__ on success.",
"params": {
"user_id": "User identifier of sticker set owner",
"name": "Sticker set name",
"png_sticker": "**Png** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a __file_id__ as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »",
"emojis": "One or more emoji corresponding to the sticker",
"mask_position": "A JSON-serialized object for position where the mask should be placed on faces"
}
},
"setStickerPositionInSet": {
"description": "Use this method to move a sticker in a set created by the bot to a specific position . Returns __True__ on success.",
"params": {
"sticker": "File identifier of the sticker",
"position": "New sticker position in the set, zero-based"
}
},
"deleteStickerFromSet": {
"description": "Use this method to delete a sticker from a set created by the bot. Returns __True__ on success.",
"params": {
"sticker": "File identifier of the sticker"
}
},
"answerInlineQuery": {
"description": "Use this method to send answers to an inline query. On success, __True__ is returned.\nNo more than **50** results per query are allowed.",
"params": {
"inline_query_id": "Unique identifier for the answered query",
"results": "A JSON-serialized array of results for the inline query",
"cache_time": "The maximum amount of time in seconds that the result of the inline query may be cached on the server.",
"is_personal": "Pass __True__, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query",
"next_offset": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes.",
"switch_pm_text": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter __switch_pm_parameter__",
"switch_pm_parameter": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. Only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed.\n__Example:__ An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ‘Connect your YouTube account’ button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a __switch_inline__ button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."
}
},
"sendInvoice": {
"description": "Use this method to send invoices. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target private chat",
"title": "Product name.",
"description": "Product description.",
"payload": "Bot-defined invoice payload. This will not be displayed to the user, use for your internal processes.",
"provider_token": "Payments provider token, obtained via Botfather",
"start_parameter": "Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter",
"currency": "Three-letter ISO 4217 currency code, see more on currencies",
"prices": "Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)",
"provider_data": "JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.",
"photo_url": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.",
"photo_size": "Photo size",
"photo_width": "Photo width",
"photo_height": "Photo height",
"need_name": "Pass __True__, if you require the user's full name to complete the order",
"need_phone_number": "Pass __True__, if you require the user's phone number to complete the order",
"need_email": "Pass __True__, if you require the user's email to complete the order",
"need_shipping_address": "Pass __True__, if you require the user's shipping address to complete the order",
"is_flexible": "Pass __True__, if the final price depends on the shipping method",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay `total price`' button will be shown. If not empty, the first button must be a Pay button."
}
},
"answerShippingQuery": {
"description": "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.",
"params": {
"shipping_query_id": "Unique identifier for the query to be answered",
"ok": "Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)",
"shipping_options": "Required if __ok__ is True. A JSON-serialized array of available shipping options.",
"error_message": "Required if __ok__ is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."
}
},
"answerPreCheckoutQuery": {
"description": "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. ",
"params": {
"pre_checkout_query_id": "Unique identifier for the query to be answered",
"ok": "Specify __True__ if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use __False__ if there are any problems.",
"error_message": "Required if __ok__ is __False__. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user."
}
},
"sendGame": {
"description": "Use this method to send a game. On success, the sent Message is returned.",
"params": {
"chat_id": "Unique identifier for the target chat",
"game_short_name": "Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.",
"disable_notification": "Sends the message silently. Users will receive a notification with no sound.",
"reply_to_message_id": "If the message is a reply, ID of the original message",
"reply_markup": "A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game."
}
},
"setGameScore": {
"description": "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__.",
"params": {
"user_id": "User identifier",
"score": "New score, must be non-negative",
"force": "Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters",
"disable_edit_message": "Pass True, if the game message should not be automatically edited to include the current scoreboard",
"chat_id": "Required if __inline_message_id__ is not specified. Unique identifier for the target chat",
"message_id": "Required if __inline_message_id__ is not specified. Identifier of the sent message",
"inline_message_id": "Required if __chat_id__ and __message_id__ are not specified. Identifier of the inline message"
}
},
"getGameHighScores": {
"description": "Use this method to get data for high score tables. Will return the score of the specified user and several of his neighbors in a game. On success, returns an Array of GameHighScore objects.",
"params": {
"user_id": "Target user id",
"chat_id": "Required if __inline_message_id__ is not specified. Unique identifier for the target chat",
"message_id": "Required if __inline_message_id__ is not specified. Identifier of the sent message",
"inline_message_id": "Required if __chat_id__ and __message_id__ are not specified. Identifier of the inline message"
}
}
}
{
"createAccount": {
"description": "Use this method to create a new Telegraph account. Most users only need one account, but this can be useful for channel administrators who would like to keep individual author names and profile links for each of their channels. On success, returns an Account object with the regular fields and an additional access_token field.",
"params": {
"short_name": "Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the 'Edit/Publish' button on Telegra.ph, other users don't see this name.",
"author_name": "Default author name used when creating new articles.",
"author_url": "Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel."
}
},
"editAccountInfo": {
"description": "Use this method to update information about a Telegraph account. Pass only the parameters that you want to edit. On success, returns an Account object with the default fields.",
"params": {
"access_token": "Access token of the Telegraph account.",
"short_name": "New account name.",
"author_name": "New default author name used when creating new articles.",
"author_url": "New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel."
}
},
"getAccountInfo": {
"description": "Use this method to get information about a Telegraph account. Returns an Account object on success.",
"params": {
"access_token": "Access token of the Telegraph account.",
"fields": "List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count."
}
},
"revokeAccessToken": {
"description": "Use this method to revoke access_token and generate a new one, for example, if the user would like to reset all connected sessions, or you have reasons to believe the token was compromised. On success, returns an Account object with new access_token and auth_url fields.",
"params": {
"access_token": "Access token of the Telegraph account."
}
},
"createPage": {
"description": "Use this method to create a new Telegraph page. On success, returns a Page object.",
"params": {
"access_token": "Access token of the Telegraph account.",
"title": "Page title.",
"author_name": "Author name, displayed below the article's title.",
"author_url": "Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.",
"content": "Content of the page. ",
"return_content": "If true, a content field will be returned in the Page object (see: Content format)."
}
},
"editPage": {
"description": "Use this method to edit an existing Telegraph page. On success, returns a Page object.",
"params": {
"access_token": "Access token of the Telegraph account.",
"path": "Path to the page.",
"title": "Page title.",
"content": "Content of the page.",
"author_name": "Author name, displayed below the article's title.",
"author_url": "Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.",
"return_content": "If true, a content field will be returned in the Page object."
}
},
"getPage": {
"description": "Use this method to get a Telegraph page. Returns a Page object on success.",
"params": {
"path": "Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).",
"return_content": "If true, content field will be returned in Page object."
}
},
"getPageList": {
"description": "Use this method to get a list of pages belonging to a Telegraph account. Returns a PageList object, sorted by most recently created pages first.",
"params": {
"access_token": "Access token of the Telegraph account.",
"offset": "Sequential number of the first page to be returned.",
"limit": "Limits the number of pages to be retrieved."
}
},
"getViews": {
"description": "Use this method to get the number of views for a Telegraph article. Returns a PageViews object on success. By default, the total number of page views will be returned.",
"params": {
"path": "Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).",
"year": "Required if month is passed. If passed, the number of page views for the requested year will be returned.",
"month": "Required if day is passed. If passed, the number of page views for the requested month will be returned.",
"day": "Required if hour is passed. If passed, the number of page views for the requested day will be returned.",
"hour": "If passed, the number of page views for the requested hour will be returned."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment