ReadonlybotReadonlystateReadonlytelegramReadonlyupdatesince API 5.3. Use Context.banChatMember
Shorthand for any message object present in the current update. One of
message, edited_message, business_message, edited_business_message
deleted_business_messages, channel_post, edited_channel_post or * callback_query.message
Shorthand for any message_id present in the current update.
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.
Identifier of a suggested post message to approve
Optionalextra: Omit<{}, "chat_id">Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future
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.
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.
Context-aware shorthand for Telegram.copyMessages
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.
Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">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.
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.
Identifier of a suggested post message to approve
Optionalextra: Omit<{}, "chat_id">Comment for the creator of the suggested post; 0-128 characters
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.
OptionalmessageId: numberContext-aware shorthand for Telegram.deleteMessages
Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted
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.
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.
Optionalextra: Omit<{}, "caption" | "chat_id" | "message_id" | "inline_message_id">Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.
Unique identifier of the business connection on behalf of which the message will be sent
Unique identifier for the target message
A JSON-serialized object for the checklist to send
Optionalextra: Omit<{}, "chat_id" | "business_connection_id" | "message_id" | "checklist">A JSON-serialized object for the new inline keyboard for the message
Optionalextra: Omit<Optionalextra: Omit<{}, "chat_id" | "message_id" | "inline_message_id" | "media">Optionalextra: Omit<{}, "text" | "chat_id" | "message_id" | "inline_message_id">Shorthand for Telegram.forwardMessages
Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">Use this method to get the current value of the bot's menu button in the current private chat. Returns MenuButton on success.
A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.
Optionaloffset: numberOptionallimit: numberShorthand for Telegram.getUserChatBoosts
Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
Optionalextra: Omit<{}, "chat_id" | "user_id">Sequential number of the first audio to be returned. By default, all audios are returned.
Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Optionaloffset: numberSequential number of the first photo to be returned. By default, all photos are returned.
Optionallimit: numberLimits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Gifts a Telegram Premium subscription to the given user. Returns True on success.
Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12
Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months
Optionalextra: Omit<{}, "chat_id" | "user_id" | "star_count" | "month_count">Text that will be shown along with the service message about the subscription; 0-128 characters
Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
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. The topic will be automatically closed if it was open. Returns True on success.
chat action type.
a function to run along with the chat action.
extra parameters for sendChatAction.
The duration (in milliseconds) between subsequent sendChatAction requests.
OptionalintervalDuration?: numberThe duration (in milliseconds) between subsequent sendChatAction requests.
https://core.telegram.org/bots/api#sendchataction
Sends the sendChatAction request repeatedly, with a delay between requests, as long as the provided callback function is being processed.
The sendChatAction errors should be ignored, because the goal is the actual long process completing and performing an action.
Shorthand for Telegram.setMessageReaction
Optionalreaction: MaybeArray<An emoji or custom_emoji_id to set as reaction to current message. Leave empty to remove reactions.
Optionalis_big: booleanPass True to set the reaction with a big animation
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.
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. The topic will be automatically unhidden if it was hidden. Returns True on success.
use Context.sendChatAction instead
Optionalextra: Omit<{}, "action" | "chat_id">Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
Unique identifier of the business connection on behalf of which the message will be sent
A JSON-serialized object for the checklist to send
Optionalextra: Omit<{}, "chat_id" | "checklist">Sends the message silently. Users will receive a notification with no sound.
Protects the contents of the sent message from forwarding and saving
Unique identifier of the message effect to be added to the message
A JSON-serialized object for description of the message to reply to
A JSON-serialized object for an inline keyboard
Optionalextra: Omit<{}, "phone_number" | "chat_id" | "first_name">Optionalextra: Omit<{}, "chat_id">Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
Identifier of the gift; limited gifts can't be sent to channel chats
Optionalextra: Omit<{}, "chat_id" | "gift_id">Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.
Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.
Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
Text that will be shown along with the gift; 0-128 characters
Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
Optionalextra: Omit<Optionalextra: Omit<{}, "chat_id" | "latitude" | "longitude">Optionalextra: Omit<{}, "chat_id" | "media">Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.
Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
Text of the message to be sent, 1-4096 characters after entities parsing
Optionalextra: Omit<{}, "text" | "chat_id" | "draft_id">Unique identifier for the target message thread
Mode for parsing entities in the message text. See formatting options for more details.
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
Optionalextra: Omit<{}, "caption" | "chat_id" | "media" | "star_count">Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">Optionalextra: Omit<{}, "chat_id" | "title" | "latitude" | "longitude" | "address">Optionalextra: Omit<{}, "chat_id" | "video_note">Use this method to change the bot's menu button in the current private chat. Returns true on success.
OptionalmenuButton: MenuButtonOptionalextra: Omit<{}, "chat_id" | "user_id">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.
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.
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.
See
https://core.telegram.org/bots/api#banchatmember