pub struct Bot { /* private fields */ }Expand description
The core Telegram Bot API client.
Bot holds the API token, HTTP request backend, and optional defaults.
It provides async methods for every Telegram Bot API endpoint (sending
messages, managing chats, uploading files, etc.).
§Construction
Use Bot::new for the simplest case or Bot::with_options for full
control over request backends and defaults.
§Thread safety
Bot is Send + Sync and can be shared across tasks via Arc<Bot>.
Implementations§
Source§impl Bot
impl Bot
Sourcepub fn new(token: impl Into<String>, request: Arc<dyn BaseRequest>) -> Bot
pub fn new(token: impl Into<String>, request: Arc<dyn BaseRequest>) -> Bot
Creates a new Bot with the given token and HTTP request backend.
Uses the Telegram production API endpoint (https://api.telegram.org).
For custom endpoints (e.g. a local Bot API server), use Bot::with_options.
Sourcepub fn with_options(
token: impl Into<String>,
request: Arc<dyn BaseRequest>,
defaults: Option<Defaults>,
) -> Bot
pub fn with_options( token: impl Into<String>, request: Arc<dyn BaseRequest>, defaults: Option<Defaults>, ) -> Bot
Creates a Bot with full configuration options.
Allows optional Defaults to merge into every API call.
Sourcepub fn base_file_url(&self) -> &str
pub fn base_file_url(&self) -> &str
Returns the base file-download URL.
Sourcepub fn bot_data(&self) -> Option<&User>
pub fn bot_data(&self) -> Option<&User>
Returns the cached bot user data from get_me(), if initialized.
Sourcepub fn local_mode(&self) -> bool
pub fn local_mode(&self) -> bool
Returns true if the bot is operating in local mode.
Sourcepub fn with_local_mode(self) -> Bot
pub fn with_local_mode(self) -> Bot
Enable local mode. When enabled, files::input_file::InputFile::Path
values are sent as file:// URIs instead of being uploaded as bytes.
Use this when connecting to a locally-hosted Bot API server instance.
Sourcepub async fn download_file_raw(
&self,
file_path: &str,
) -> Result<Vec<u8>, TelegramError>
pub async fn download_file_raw( &self, file_path: &str, ) -> Result<Vec<u8>, TelegramError>
Downloads a file from the Telegram servers given its file_path.
Sourcepub async fn initialize(&mut self) -> Result<(), TelegramError>
pub async fn initialize(&mut self) -> Result<(), TelegramError>
Initializes the bot by calling get_me() and caching the result.
Sourcepub async fn shutdown(&self) -> Result<(), TelegramError>
pub async fn shutdown(&self) -> Result<(), TelegramError>
Shuts down the bot and releases the HTTP request backend.
Sourcepub async fn do_api_request<T>(
&self,
method: &str,
params: Vec<RequestParameter>,
) -> Result<T, TelegramError>where
T: DeserializeOwned,
pub async fn do_api_request<T>(
&self,
method: &str,
params: Vec<RequestParameter>,
) -> Result<T, TelegramError>where
T: DeserializeOwned,
Sends a raw API request with the given method name and parameters.
Sourcepub async fn do_api_request_with_kwargs<T>(
&self,
method: &str,
params: Vec<RequestParameter>,
api_kwargs: Option<HashMap<String, Value>>,
) -> Result<T, TelegramError>where
T: DeserializeOwned,
pub async fn do_api_request_with_kwargs<T>(
&self,
method: &str,
params: Vec<RequestParameter>,
api_kwargs: Option<HashMap<String, Value>>,
) -> Result<T, TelegramError>where
T: DeserializeOwned,
Sends a raw API request with additional keyword arguments merged into the parameters.
Sourcepub async fn get_updates_raw(
&self,
offset: Option<i64>,
limit: Option<i32>,
timeout: Option<i32>,
allowed_updates: Option<Vec<String>>,
) -> Result<Vec<Update>, TelegramError>
pub async fn get_updates_raw( &self, offset: Option<i64>, limit: Option<i32>, timeout: Option<i32>, allowed_updates: Option<Vec<String>>, ) -> Result<Vec<Update>, TelegramError>
Calls the Telegram getUpdates long-polling endpoint.
Sourcepub async fn set_webhook_raw(
&self,
url: &str,
certificate: Option<InputFile>,
ip_address: Option<&str>,
max_connections: Option<i32>,
allowed_updates: Option<Vec<String>>,
drop_pending_updates: Option<bool>,
secret_token: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_webhook_raw( &self, url: &str, certificate: Option<InputFile>, ip_address: Option<&str>, max_connections: Option<i32>, allowed_updates: Option<Vec<String>>, drop_pending_updates: Option<bool>, secret_token: Option<&str>, ) -> Result<bool, TelegramError>
Sets a webhook for receiving updates. Internal raw method.
Calls the Telegram setWebhook API method.
Sourcepub async fn delete_webhook_raw(
&self,
drop_pending_updates: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn delete_webhook_raw( &self, drop_pending_updates: Option<bool>, ) -> Result<bool, TelegramError>
Removes the webhook integration. Internal raw method.
Calls the Telegram deleteWebhook API method.
Sourcepub async fn get_webhook_info_raw(&self) -> Result<WebhookInfo, TelegramError>
pub async fn get_webhook_info_raw(&self) -> Result<WebhookInfo, TelegramError>
Use this method to get current webhook status.
Calls the Telegram getWebhookInfo API method.
Sourcepub async fn get_me_raw(&self) -> Result<User, TelegramError>
pub async fn get_me_raw(&self) -> Result<User, TelegramError>
Calls the getMe endpoint, returning the bot’s own User object.
Sourcepub async fn log_out_raw(&self) -> Result<bool, TelegramError>
pub async fn log_out_raw(&self) -> Result<bool, TelegramError>
Use this method to log out from the cloud Bot API server.
Calls the Telegram logOut API method.
Sourcepub async fn close_raw(&self) -> Result<bool, TelegramError>
pub async fn close_raw(&self) -> Result<bool, TelegramError>
Use this method to close the bot instance before moving it from one local server to another.
Calls the Telegram close API method.
Source§impl Bot
impl Bot
Use this method to change the bot’s menu button in a private chat, or the default menu button.
Calls the Telegram setChatMenuButton API method.
Use this method to get the current value of the bot’s menu button in a private chat.
Calls the Telegram getChatMenuButton API method.
Sourcepub async fn set_my_commands_raw(
&self,
commands: Vec<BotCommand>,
scope: Option<BotCommandScope>,
language_code: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_my_commands_raw( &self, commands: Vec<BotCommand>, scope: Option<BotCommandScope>, language_code: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to change the list of the bot’s commands.
Calls the Telegram setMyCommands API method.
Sourcepub async fn get_my_commands_raw(
&self,
scope: Option<BotCommandScope>,
language_code: Option<&str>,
) -> Result<Vec<BotCommand>, TelegramError>
pub async fn get_my_commands_raw( &self, scope: Option<BotCommandScope>, language_code: Option<&str>, ) -> Result<Vec<BotCommand>, TelegramError>
Use this method to get the current list of the bot’s commands.
Calls the Telegram getMyCommands API method.
Sourcepub async fn delete_my_commands_raw(
&self,
scope: Option<BotCommandScope>,
language_code: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn delete_my_commands_raw( &self, scope: Option<BotCommandScope>, language_code: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to delete the list of the bot’s commands for a given scope and language.
Calls the Telegram deleteMyCommands API method.
Sourcepub async fn set_my_default_administrator_rights_raw(
&self,
rights: Option<ChatAdministratorRights>,
for_channels: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn set_my_default_administrator_rights_raw( &self, rights: Option<ChatAdministratorRights>, for_channels: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to change the default administrator rights requested by the bot.
Calls the Telegram setMyDefaultAdministratorRights API method.
Sourcepub async fn get_my_default_administrator_rights_raw(
&self,
for_channels: Option<bool>,
) -> Result<ChatAdministratorRights, TelegramError>
pub async fn get_my_default_administrator_rights_raw( &self, for_channels: Option<bool>, ) -> Result<ChatAdministratorRights, TelegramError>
Use this method to get the current default administrator rights of the bot.
Calls the Telegram getMyDefaultAdministratorRights API method.
Sourcepub async fn set_my_description_raw(
&self,
description: Option<&str>,
language_code: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_my_description_raw( &self, description: Option<&str>, language_code: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to change the bot’s description.
Calls the Telegram setMyDescription API method.
Sourcepub async fn get_my_description_raw(
&self,
language_code: Option<&str>,
) -> Result<BotDescription, TelegramError>
pub async fn get_my_description_raw( &self, language_code: Option<&str>, ) -> Result<BotDescription, TelegramError>
Use this method to get the current bot description.
Calls the Telegram getMyDescription API method.
Sourcepub async fn set_my_short_description_raw(
&self,
short_description: Option<&str>,
language_code: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_my_short_description_raw( &self, short_description: Option<&str>, language_code: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to change the bot’s short description.
Calls the Telegram setMyShortDescription API method.
Sourcepub async fn get_my_short_description_raw(
&self,
language_code: Option<&str>,
) -> Result<BotShortDescription, TelegramError>
pub async fn get_my_short_description_raw( &self, language_code: Option<&str>, ) -> Result<BotShortDescription, TelegramError>
Use this method to get the current bot short description.
Calls the Telegram getMyShortDescription API method.
Sourcepub async fn set_my_name_raw(
&self,
name: Option<&str>,
language_code: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_my_name_raw( &self, name: Option<&str>, language_code: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to change the bot’s name.
Calls the Telegram setMyName API method.
Sourcepub async fn get_my_name_raw(
&self,
language_code: Option<&str>,
) -> Result<BotName, TelegramError>
pub async fn get_my_name_raw( &self, language_code: Option<&str>, ) -> Result<BotName, TelegramError>
Use this method to get the current bot name.
Calls the Telegram getMyName API method.
Source§impl Bot
impl Bot
Sourcepub async fn get_business_connection_raw(
&self,
business_connection_id: &str,
) -> Result<BusinessConnection, TelegramError>
pub async fn get_business_connection_raw( &self, business_connection_id: &str, ) -> Result<BusinessConnection, TelegramError>
Use this method to get information about the connection of the bot with a business account.
Calls the Telegram getBusinessConnection API method.
Sourcepub async fn get_business_account_gifts_raw(
&self,
business_connection_id: &str,
exclude_unsaved: Option<bool>,
exclude_saved: Option<bool>,
exclude_unlimited: Option<bool>,
exclude_unique: Option<bool>,
sort_by_price: Option<bool>,
offset: Option<&str>,
limit: Option<i64>,
exclude_limited_upgradable: Option<bool>,
exclude_limited_non_upgradable: Option<bool>,
exclude_from_blockchain: Option<bool>,
) -> Result<OwnedGifts, TelegramError>
pub async fn get_business_account_gifts_raw( &self, business_connection_id: &str, exclude_unsaved: Option<bool>, exclude_saved: Option<bool>, exclude_unlimited: Option<bool>, exclude_unique: Option<bool>, sort_by_price: Option<bool>, offset: Option<&str>, limit: Option<i64>, exclude_limited_upgradable: Option<bool>, exclude_limited_non_upgradable: Option<bool>, exclude_from_blockchain: Option<bool>, ) -> Result<OwnedGifts, TelegramError>
Use this method to get the gifts received by a business account.
Calls the Telegram getBusinessAccountGifts API method.
Sourcepub async fn get_business_account_star_balance_raw(
&self,
business_connection_id: &str,
) -> Result<StarAmount, TelegramError>
pub async fn get_business_account_star_balance_raw( &self, business_connection_id: &str, ) -> Result<StarAmount, TelegramError>
Use this method to get the current star balance of a business account.
Calls the Telegram getBusinessAccountStarBalance API method.
Sourcepub async fn read_business_message_raw(
&self,
business_connection_id: &str,
chat_id: i64,
message_id: i64,
) -> Result<bool, TelegramError>
pub async fn read_business_message_raw( &self, business_connection_id: &str, chat_id: i64, message_id: i64, ) -> Result<bool, TelegramError>
Use this method to mark a message as read on behalf of a business account.
Calls the Telegram readBusinessMessage API method.
Sourcepub async fn delete_business_messages_raw(
&self,
business_connection_id: &str,
message_ids: Vec<i64>,
) -> Result<bool, TelegramError>
pub async fn delete_business_messages_raw( &self, business_connection_id: &str, message_ids: Vec<i64>, ) -> Result<bool, TelegramError>
Use this method to delete messages on behalf of a business account.
Calls the Telegram deleteBusinessMessages API method.
Sourcepub async fn set_business_account_name_raw(
&self,
business_connection_id: &str,
first_name: &str,
last_name: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_business_account_name_raw( &self, business_connection_id: &str, first_name: &str, last_name: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to set the name of a business account.
Calls the Telegram setBusinessAccountName API method.
Sourcepub async fn set_business_account_username_raw(
&self,
business_connection_id: &str,
username: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_business_account_username_raw( &self, business_connection_id: &str, username: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to set the username of a business account.
Calls the Telegram setBusinessAccountUsername API method.
Sourcepub async fn set_business_account_bio_raw(
&self,
business_connection_id: &str,
bio: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_business_account_bio_raw( &self, business_connection_id: &str, bio: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to set the bio of a business account.
Calls the Telegram setBusinessAccountBio API method.
Sourcepub async fn set_business_account_gift_settings_raw(
&self,
business_connection_id: &str,
show_gift_button: bool,
accepted_gift_types: AcceptedGiftTypes,
) -> Result<bool, TelegramError>
pub async fn set_business_account_gift_settings_raw( &self, business_connection_id: &str, show_gift_button: bool, accepted_gift_types: AcceptedGiftTypes, ) -> Result<bool, TelegramError>
Use this method to set the gift settings of a business account.
Calls the Telegram setBusinessAccountGiftSettings API method.
Sourcepub async fn set_business_account_profile_photo_raw(
&self,
business_connection_id: &str,
photo: Value,
is_public: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn set_business_account_profile_photo_raw( &self, business_connection_id: &str, photo: Value, is_public: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to set the profile photo of a business account.
Calls the Telegram setBusinessAccountProfilePhoto API method.
Sourcepub async fn remove_business_account_profile_photo_raw(
&self,
business_connection_id: &str,
is_public: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn remove_business_account_profile_photo_raw( &self, business_connection_id: &str, is_public: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to remove the profile photo of a business account.
Calls the Telegram removeBusinessAccountProfilePhoto API method.
Sourcepub async fn convert_gift_to_stars_raw(
&self,
business_connection_id: &str,
owned_gift_id: &str,
) -> Result<bool, TelegramError>
pub async fn convert_gift_to_stars_raw( &self, business_connection_id: &str, owned_gift_id: &str, ) -> Result<bool, TelegramError>
Use this method to convert a regular gift owned by a business account to Telegram Stars.
Calls the Telegram convertGiftToStars API method.
Sourcepub async fn upgrade_gift_raw(
&self,
business_connection_id: &str,
owned_gift_id: &str,
keep_original_details: Option<bool>,
star_count: Option<i64>,
) -> Result<bool, TelegramError>
pub async fn upgrade_gift_raw( &self, business_connection_id: &str, owned_gift_id: &str, keep_original_details: Option<bool>, star_count: Option<i64>, ) -> Result<bool, TelegramError>
Use this method to upgrade a regular gift to a unique gift.
Calls the Telegram upgradeGift API method.
Sourcepub async fn transfer_gift_raw(
&self,
business_connection_id: &str,
owned_gift_id: &str,
new_owner_chat_id: i64,
star_count: Option<i64>,
) -> Result<bool, TelegramError>
pub async fn transfer_gift_raw( &self, business_connection_id: &str, owned_gift_id: &str, new_owner_chat_id: i64, star_count: Option<i64>, ) -> Result<bool, TelegramError>
Use this method to transfer a unique gift to another user or channel chat.
Calls the Telegram transferGift API method.
Sourcepub async fn transfer_business_account_stars_raw(
&self,
business_connection_id: &str,
star_count: i64,
) -> Result<bool, TelegramError>
pub async fn transfer_business_account_stars_raw( &self, business_connection_id: &str, star_count: i64, ) -> Result<bool, TelegramError>
Use this method to transfer Telegram Stars from a business account to the bot’s balance.
Calls the Telegram transferBusinessAccountStars API method.
Source§impl Bot
impl Bot
Sourcepub async fn edit_message_text_raw(
&self,
text: &str,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
parse_mode: Option<&str>,
entities: Option<Vec<MessageEntity>>,
link_preview_options: Option<LinkPreviewOptions>,
reply_markup: Option<Value>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn edit_message_text_raw( &self, text: &str, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, parse_mode: Option<&str>, entities: Option<Vec<MessageEntity>>, link_preview_options: Option<LinkPreviewOptions>, reply_markup: Option<Value>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Edits the text of a message. Internal raw method used by builder APIs.
Calls the Telegram editMessageText API method.
Sourcepub async fn edit_message_caption_raw(
&self,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
reply_markup: Option<Value>,
show_caption_above_media: Option<bool>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn edit_message_caption_raw( &self, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, reply_markup: Option<Value>, show_caption_above_media: Option<bool>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Edits the caption of a message. Internal raw method used by builder APIs.
Calls the Telegram editMessageCaption API method.
Sourcepub async fn edit_message_media_raw(
&self,
media: Value,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
reply_markup: Option<Value>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn edit_message_media_raw( &self, media: Value, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, reply_markup: Option<Value>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Edits the media content of a message. Internal raw method used by builder APIs.
Calls the Telegram editMessageMedia API method.
Sourcepub async fn edit_message_reply_markup_raw(
&self,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
reply_markup: Option<Value>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn edit_message_reply_markup_raw( &self, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, reply_markup: Option<Value>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Edits the reply markup of a message. Internal raw method used by builder APIs.
Calls the Telegram editMessageReplyMarkup API method.
Sourcepub async fn edit_message_live_location_raw(
&self,
latitude: f64,
longitude: f64,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
horizontal_accuracy: Option<f64>,
heading: Option<i64>,
proximity_alert_radius: Option<i64>,
reply_markup: Option<Value>,
live_period: Option<i64>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn edit_message_live_location_raw( &self, latitude: f64, longitude: f64, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, horizontal_accuracy: Option<f64>, heading: Option<i64>, proximity_alert_radius: Option<i64>, reply_markup: Option<Value>, live_period: Option<i64>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Use this method to edit live location messages.
Calls the Telegram editMessageLiveLocation API method.
Sourcepub async fn stop_message_live_location_raw(
&self,
chat_id: Option<ChatId>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
reply_markup: Option<Value>,
business_connection_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn stop_message_live_location_raw( &self, chat_id: Option<ChatId>, message_id: Option<i64>, inline_message_id: Option<&str>, reply_markup: Option<Value>, business_connection_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Use this method to stop updating a live location message.
Calls the Telegram stopMessageLiveLocation API method.
Sourcepub async fn edit_message_checklist_raw(
&self,
business_connection_id: &str,
chat_id: i64,
message_id: i64,
checklist: InputChecklist,
reply_markup: Option<Value>,
) -> Result<Message, TelegramError>
pub async fn edit_message_checklist_raw( &self, business_connection_id: &str, chat_id: i64, message_id: i64, checklist: InputChecklist, reply_markup: Option<Value>, ) -> Result<Message, TelegramError>
Use this method to edit a checklist message sent by the bot on behalf of a business account.
Calls the Telegram editMessageChecklist API method.
Source§impl Bot
impl Bot
Sourcepub async fn create_forum_topic_raw(
&self,
chat_id: ChatId,
name: &str,
icon_color: Option<i64>,
icon_custom_emoji_id: Option<&str>,
) -> Result<ForumTopic, TelegramError>
pub async fn create_forum_topic_raw( &self, chat_id: ChatId, name: &str, icon_color: Option<i64>, icon_custom_emoji_id: Option<&str>, ) -> Result<ForumTopic, TelegramError>
Use this method to create a topic in a forum supergroup chat.
Calls the Telegram createForumTopic API method.
Sourcepub async fn edit_forum_topic_raw(
&self,
chat_id: ChatId,
message_thread_id: i64,
name: Option<&str>,
icon_custom_emoji_id: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn edit_forum_topic_raw( &self, chat_id: ChatId, message_thread_id: i64, name: Option<&str>, icon_custom_emoji_id: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to edit name and icon of a topic in a forum supergroup chat.
Calls the Telegram editForumTopic API method.
Sourcepub async fn close_forum_topic_raw(
&self,
chat_id: ChatId,
message_thread_id: i64,
) -> Result<bool, TelegramError>
pub async fn close_forum_topic_raw( &self, chat_id: ChatId, message_thread_id: i64, ) -> Result<bool, TelegramError>
Use this method to close an open topic in a forum supergroup chat.
Calls the Telegram closeForumTopic API method.
Sourcepub async fn reopen_forum_topic_raw(
&self,
chat_id: ChatId,
message_thread_id: i64,
) -> Result<bool, TelegramError>
pub async fn reopen_forum_topic_raw( &self, chat_id: ChatId, message_thread_id: i64, ) -> Result<bool, TelegramError>
Use this method to reopen a closed topic in a forum supergroup chat.
Calls the Telegram reopenForumTopic API method.
Sourcepub async fn delete_forum_topic_raw(
&self,
chat_id: ChatId,
message_thread_id: i64,
) -> Result<bool, TelegramError>
pub async fn delete_forum_topic_raw( &self, chat_id: ChatId, message_thread_id: i64, ) -> Result<bool, TelegramError>
Use this method to delete a forum topic along with all its messages.
Calls the Telegram deleteForumTopic API method.
Sourcepub async fn unpin_all_forum_topic_messages_raw(
&self,
chat_id: ChatId,
message_thread_id: i64,
) -> Result<bool, TelegramError>
pub async fn unpin_all_forum_topic_messages_raw( &self, chat_id: ChatId, message_thread_id: i64, ) -> Result<bool, TelegramError>
Use this method to clear the list of pinned messages in a forum topic.
Calls the Telegram unpinAllForumTopicMessages API method.
Sourcepub async fn unpin_all_general_forum_topic_messages_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn unpin_all_general_forum_topic_messages_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to clear the list of pinned messages in a General forum topic.
Calls the Telegram unpinAllGeneralForumTopicMessages API method.
Sourcepub async fn edit_general_forum_topic_raw(
&self,
chat_id: ChatId,
name: &str,
) -> Result<bool, TelegramError>
pub async fn edit_general_forum_topic_raw( &self, chat_id: ChatId, name: &str, ) -> Result<bool, TelegramError>
Use this method to edit the name of the ‘General’ topic in a forum supergroup chat.
Calls the Telegram editGeneralForumTopic API method.
Sourcepub async fn close_general_forum_topic_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn close_general_forum_topic_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to close an open ‘General’ topic in a forum supergroup chat.
Calls the Telegram closeGeneralForumTopic API method.
Sourcepub async fn reopen_general_forum_topic_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn reopen_general_forum_topic_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to reopen a closed ‘General’ topic in a forum supergroup chat.
Calls the Telegram reopenGeneralForumTopic API method.
Sourcepub async fn hide_general_forum_topic_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn hide_general_forum_topic_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to hide the ‘General’ topic in a forum supergroup chat.
Calls the Telegram hideGeneralForumTopic API method.
Sourcepub async fn unhide_general_forum_topic_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn unhide_general_forum_topic_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to unhide the ‘General’ topic in a forum supergroup chat.
Calls the Telegram unhideGeneralForumTopic API method.
Source§impl Bot
impl Bot
Sourcepub async fn send_game_raw(
&self,
chat_id: i64,
game_short_name: &str,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
) -> Result<Message, TelegramError>
pub async fn send_game_raw( &self, chat_id: i64, game_short_name: &str, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, ) -> Result<Message, TelegramError>
Use this method to send a game.
Calls the Telegram sendGame API method.
Sourcepub async fn set_game_score_raw(
&self,
user_id: i64,
score: i64,
force: Option<bool>,
disable_edit_message: Option<bool>,
chat_id: Option<i64>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
) -> Result<MessageOrBool, TelegramError>
pub async fn set_game_score_raw( &self, user_id: i64, score: i64, force: Option<bool>, disable_edit_message: Option<bool>, chat_id: Option<i64>, message_id: Option<i64>, inline_message_id: Option<&str>, ) -> Result<MessageOrBool, TelegramError>
Use this method to set the score of the specified user in a game message.
Calls the Telegram setGameScore API method.
Sourcepub async fn get_game_high_scores_raw(
&self,
user_id: i64,
chat_id: Option<i64>,
message_id: Option<i64>,
inline_message_id: Option<&str>,
) -> Result<Vec<GameHighScore>, TelegramError>
pub async fn get_game_high_scores_raw( &self, user_id: i64, chat_id: Option<i64>, message_id: Option<i64>, inline_message_id: Option<&str>, ) -> Result<Vec<GameHighScore>, TelegramError>
Use this method to get data for high score tables.
Calls the Telegram getGameHighScores API method.
Source§impl Bot
impl Bot
Sourcepub async fn get_available_gifts_raw(&self) -> Result<Gifts, TelegramError>
pub async fn get_available_gifts_raw(&self) -> Result<Gifts, TelegramError>
Use this method to get the list of gifts that can be sent by the bot to users.
Calls the Telegram getAvailableGifts API method.
Sourcepub async fn send_gift_raw(
&self,
gift_id: &str,
user_id: Option<i64>,
chat_id: Option<ChatId>,
text: Option<&str>,
text_parse_mode: Option<&str>,
text_entities: Option<Vec<MessageEntity>>,
pay_for_upgrade: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn send_gift_raw( &self, gift_id: &str, user_id: Option<i64>, chat_id: Option<ChatId>, text: Option<&str>, text_parse_mode: Option<&str>, text_entities: Option<Vec<MessageEntity>>, pay_for_upgrade: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to send a gift to a user or channel chat.
Calls the Telegram sendGift API method.
Use this method to gift a Telegram Premium subscription to a user.
Calls the Telegram giftPremiumSubscription API method.
Sourcepub async fn get_user_gifts_raw(
&self,
user_id: i64,
exclude_unlimited: Option<bool>,
exclude_limited_upgradable: Option<bool>,
exclude_limited_non_upgradable: Option<bool>,
exclude_from_blockchain: Option<bool>,
exclude_unique: Option<bool>,
sort_by_price: Option<bool>,
offset: Option<&str>,
limit: Option<i64>,
) -> Result<OwnedGifts, TelegramError>
pub async fn get_user_gifts_raw( &self, user_id: i64, exclude_unlimited: Option<bool>, exclude_limited_upgradable: Option<bool>, exclude_limited_non_upgradable: Option<bool>, exclude_from_blockchain: Option<bool>, exclude_unique: Option<bool>, sort_by_price: Option<bool>, offset: Option<&str>, limit: Option<i64>, ) -> Result<OwnedGifts, TelegramError>
Use this method to get the list of gifts received by a user.
Calls the Telegram getUserGifts API method.
Sourcepub async fn get_chat_gifts_raw(
&self,
chat_id: ChatId,
exclude_unsaved: Option<bool>,
exclude_saved: Option<bool>,
exclude_unlimited: Option<bool>,
exclude_limited_upgradable: Option<bool>,
exclude_limited_non_upgradable: Option<bool>,
exclude_from_blockchain: Option<bool>,
exclude_unique: Option<bool>,
sort_by_price: Option<bool>,
offset: Option<&str>,
limit: Option<i64>,
) -> Result<OwnedGifts, TelegramError>
pub async fn get_chat_gifts_raw( &self, chat_id: ChatId, exclude_unsaved: Option<bool>, exclude_saved: Option<bool>, exclude_unlimited: Option<bool>, exclude_limited_upgradable: Option<bool>, exclude_limited_non_upgradable: Option<bool>, exclude_from_blockchain: Option<bool>, exclude_unique: Option<bool>, sort_by_price: Option<bool>, offset: Option<&str>, limit: Option<i64>, ) -> Result<OwnedGifts, TelegramError>
Use this method to get the list of gifts received by a chat.
Calls the Telegram getChatGifts API method.
Source§impl Bot
impl Bot
Sourcepub async fn answer_callback_query_raw(
&self,
callback_query_id: &str,
text: Option<&str>,
show_alert: Option<bool>,
url: Option<&str>,
cache_time: Option<i64>,
) -> Result<bool, TelegramError>
pub async fn answer_callback_query_raw( &self, callback_query_id: &str, text: Option<&str>, show_alert: Option<bool>, url: Option<&str>, cache_time: Option<i64>, ) -> Result<bool, TelegramError>
Answers a callback query. Internal raw method used by builder APIs.
Calls the Telegram answerCallbackQuery API method.
Sourcepub async fn answer_inline_query_raw(
&self,
inline_query_id: &str,
results: Vec<Value>,
cache_time: Option<i64>,
is_personal: Option<bool>,
next_offset: Option<&str>,
button: Option<Value>,
) -> Result<bool, TelegramError>
pub async fn answer_inline_query_raw( &self, inline_query_id: &str, results: Vec<Value>, cache_time: Option<i64>, is_personal: Option<bool>, next_offset: Option<&str>, button: Option<Value>, ) -> Result<bool, TelegramError>
Answers an inline query. Internal raw method used by builder APIs.
Calls the Telegram answerInlineQuery API method.
Sourcepub async fn save_prepared_inline_message_raw(
&self,
user_id: i64,
result: Value,
allow_user_chats: Option<bool>,
allow_bot_chats: Option<bool>,
allow_group_chats: Option<bool>,
allow_channel_chats: Option<bool>,
) -> Result<Value, TelegramError>
pub async fn save_prepared_inline_message_raw( &self, user_id: i64, result: Value, allow_user_chats: Option<bool>, allow_bot_chats: Option<bool>, allow_group_chats: Option<bool>, allow_channel_chats: Option<bool>, ) -> Result<Value, TelegramError>
Use this method to store a message that can be sent by a user of a Mini App.
Calls the Telegram savePreparedInlineMessage API method.
Sourcepub async fn answer_web_app_query_raw(
&self,
web_app_query_id: &str,
result: Value,
) -> Result<SentWebAppMessage, TelegramError>
pub async fn answer_web_app_query_raw( &self, web_app_query_id: &str, result: Value, ) -> Result<SentWebAppMessage, TelegramError>
Use this method to set the result of an interaction with a Web App.
Calls the Telegram answerWebAppQuery API method.
Source§impl Bot
impl Bot
Sourcepub async fn send_photo_raw(
&self,
chat_id: ChatId,
photo: InputFile,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
has_spoiler: Option<bool>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
show_caption_above_media: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_photo_raw( &self, chat_id: ChatId, photo: InputFile, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, has_spoiler: Option<bool>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, show_caption_above_media: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a photo. Internal raw method used by builder APIs.
Calls the Telegram sendPhoto API method.
Sourcepub async fn send_audio_raw(
&self,
chat_id: ChatId,
audio: InputFile,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
duration: Option<i64>,
performer: Option<&str>,
title: Option<&str>,
thumbnail: Option<InputFile>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_audio_raw( &self, chat_id: ChatId, audio: InputFile, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, duration: Option<i64>, performer: Option<&str>, title: Option<&str>, thumbnail: Option<InputFile>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends an audio file. Internal raw method used by builder APIs.
Calls the Telegram sendAudio API method.
Sourcepub async fn send_document_raw(
&self,
chat_id: ChatId,
document: InputFile,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
disable_content_type_detection: Option<bool>,
thumbnail: Option<InputFile>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_document_raw( &self, chat_id: ChatId, document: InputFile, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, disable_content_type_detection: Option<bool>, thumbnail: Option<InputFile>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a general file. Internal raw method used by builder APIs.
Calls the Telegram sendDocument API method.
Sourcepub async fn send_video_raw(
&self,
chat_id: ChatId,
video: InputFile,
duration: Option<i64>,
width: Option<i64>,
height: Option<i64>,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
supports_streaming: Option<bool>,
thumbnail: Option<InputFile>,
has_spoiler: Option<bool>,
show_caption_above_media: Option<bool>,
cover: Option<InputFile>,
start_timestamp: Option<i64>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_video_raw( &self, chat_id: ChatId, video: InputFile, duration: Option<i64>, width: Option<i64>, height: Option<i64>, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, supports_streaming: Option<bool>, thumbnail: Option<InputFile>, has_spoiler: Option<bool>, show_caption_above_media: Option<bool>, cover: Option<InputFile>, start_timestamp: Option<i64>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a video file. Internal raw method used by builder APIs.
Calls the Telegram sendVideo API method.
Sourcepub async fn send_animation_raw(
&self,
chat_id: ChatId,
animation: InputFile,
duration: Option<i64>,
width: Option<i64>,
height: Option<i64>,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
thumbnail: Option<InputFile>,
has_spoiler: Option<bool>,
show_caption_above_media: Option<bool>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_animation_raw( &self, chat_id: ChatId, animation: InputFile, duration: Option<i64>, width: Option<i64>, height: Option<i64>, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, thumbnail: Option<InputFile>, has_spoiler: Option<bool>, show_caption_above_media: Option<bool>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends an animation (GIF or H.264/MPEG-4 AVC video without sound). Internal raw method.
Calls the Telegram sendAnimation API method.
Sourcepub async fn send_voice_raw(
&self,
chat_id: ChatId,
voice: InputFile,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
duration: Option<i64>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_voice_raw( &self, chat_id: ChatId, voice: InputFile, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, duration: Option<i64>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a voice message. Internal raw method used by builder APIs.
Calls the Telegram sendVoice API method.
Sourcepub async fn send_video_note_raw(
&self,
chat_id: ChatId,
video_note: InputFile,
duration: Option<i64>,
length: Option<i64>,
thumbnail: Option<InputFile>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_video_note_raw( &self, chat_id: ChatId, video_note: InputFile, duration: Option<i64>, length: Option<i64>, thumbnail: Option<InputFile>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a video note (rounded square video). Internal raw method used by builder APIs.
Calls the Telegram sendVideoNote API method.
Sourcepub async fn send_media_group_raw(
&self,
chat_id: ChatId,
media: Vec<Value>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
message_thread_id: Option<i64>,
reply_parameters: Option<ReplyParameters>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Vec<Message>, TelegramError>
pub async fn send_media_group_raw( &self, chat_id: ChatId, media: Vec<Value>, disable_notification: Option<bool>, protect_content: Option<bool>, message_thread_id: Option<i64>, reply_parameters: Option<ReplyParameters>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Vec<Message>, TelegramError>
Use this method to send a group of photos, videos, documents or audios as an album.
Calls the Telegram sendMediaGroup API method.
Sourcepub async fn send_paid_media_raw(
&self,
chat_id: ChatId,
star_count: i64,
media: Vec<Value>,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
show_caption_above_media: Option<bool>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
business_connection_id: Option<&str>,
payload: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
message_thread_id: Option<i64>,
) -> Result<Message, TelegramError>
pub async fn send_paid_media_raw( &self, chat_id: ChatId, star_count: i64, media: Vec<Value>, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, show_caption_above_media: Option<bool>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, business_connection_id: Option<&str>, payload: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, message_thread_id: Option<i64>, ) -> Result<Message, TelegramError>
Use this method to send paid media.
Calls the Telegram sendPaidMedia API method.
Source§impl Bot
impl Bot
Sourcepub async fn send_location_raw(
&self,
chat_id: ChatId,
latitude: f64,
longitude: f64,
horizontal_accuracy: Option<f64>,
live_period: Option<i64>,
heading: Option<i64>,
proximity_alert_radius: Option<i64>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_location_raw( &self, chat_id: ChatId, latitude: f64, longitude: f64, horizontal_accuracy: Option<f64>, live_period: Option<i64>, heading: Option<i64>, proximity_alert_radius: Option<i64>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a point on the map. Internal raw method used by builder APIs.
Calls the Telegram sendLocation API method.
Sourcepub async fn send_venue_raw(
&self,
chat_id: ChatId,
latitude: f64,
longitude: f64,
title: &str,
address: &str,
foursquare_id: Option<&str>,
foursquare_type: Option<&str>,
google_place_id: Option<&str>,
google_place_type: Option<&str>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_venue_raw( &self, chat_id: ChatId, latitude: f64, longitude: f64, title: &str, address: &str, foursquare_id: Option<&str>, foursquare_type: Option<&str>, google_place_id: Option<&str>, google_place_type: Option<&str>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends information about a venue. Internal raw method used by builder APIs.
Calls the Telegram sendVenue API method.
Sourcepub async fn send_contact_raw(
&self,
chat_id: ChatId,
phone_number: &str,
first_name: &str,
last_name: Option<&str>,
vcard: Option<&str>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_contact_raw( &self, chat_id: ChatId, phone_number: &str, first_name: &str, last_name: Option<&str>, vcard: Option<&str>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends phone contacts. Internal raw method used by builder APIs.
Calls the Telegram sendContact API method.
Sourcepub async fn send_poll_raw(
&self,
chat_id: ChatId,
question: &str,
options: Vec<Value>,
is_anonymous: Option<bool>,
poll_type: Option<&str>,
allows_multiple_answers: Option<bool>,
correct_option_id: Option<i64>,
explanation: Option<&str>,
explanation_parse_mode: Option<&str>,
explanation_entities: Option<Vec<MessageEntity>>,
open_period: Option<i64>,
close_date: Option<i64>,
is_closed: Option<bool>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
question_parse_mode: Option<&str>,
question_entities: Option<Vec<MessageEntity>>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_poll_raw( &self, chat_id: ChatId, question: &str, options: Vec<Value>, is_anonymous: Option<bool>, poll_type: Option<&str>, allows_multiple_answers: Option<bool>, correct_option_id: Option<i64>, explanation: Option<&str>, explanation_parse_mode: Option<&str>, explanation_entities: Option<Vec<MessageEntity>>, open_period: Option<i64>, close_date: Option<i64>, is_closed: Option<bool>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, question_parse_mode: Option<&str>, question_entities: Option<Vec<MessageEntity>>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a native poll. Internal raw method used by builder APIs.
Calls the Telegram sendPoll API method.
Sourcepub async fn send_dice_raw(
&self,
chat_id: ChatId,
emoji: Option<&str>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_dice_raw( &self, chat_id: ChatId, emoji: Option<&str>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends an animated emoji that will display a random value. Internal raw method.
Calls the Telegram sendDice API method.
Sourcepub async fn send_chat_action_raw(
&self,
chat_id: ChatId,
action: &str,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn send_chat_action_raw( &self, chat_id: ChatId, action: &str, message_thread_id: Option<i64>, business_connection_id: Option<&str>, ) -> Result<bool, TelegramError>
Tells the user that something is happening on the bot’s side. Internal raw method.
Calls the Telegram sendChatAction API method.
Sourcepub async fn send_checklist_raw(
&self,
business_connection_id: &str,
chat_id: i64,
checklist: InputChecklist,
disable_notification: Option<bool>,
protect_content: Option<bool>,
message_effect_id: Option<&str>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
) -> Result<Message, TelegramError>
pub async fn send_checklist_raw( &self, business_connection_id: &str, chat_id: i64, checklist: InputChecklist, disable_notification: Option<bool>, protect_content: Option<bool>, message_effect_id: Option<&str>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, ) -> Result<Message, TelegramError>
Use this method to send a checklist message on behalf of a business account.
Calls the Telegram sendChecklist API method.
Source§impl Bot
impl Bot
Sourcepub async fn set_passport_data_errors_raw(
&self,
user_id: i64,
errors: Vec<Value>,
) -> Result<bool, TelegramError>
pub async fn set_passport_data_errors_raw( &self, user_id: i64, errors: Vec<Value>, ) -> Result<bool, TelegramError>
Use this method to inform a user that some of the Telegram Passport elements contain errors.
Calls the Telegram setPassportDataErrors API method.
Source§impl Bot
impl Bot
Sourcepub async fn send_invoice_raw(
&self,
chat_id: ChatId,
title: &str,
description: &str,
payload: &str,
currency: &str,
prices: Vec<Value>,
provider_token: Option<&str>,
max_tip_amount: Option<i64>,
suggested_tip_amounts: Option<Vec<i64>>,
start_parameter: Option<&str>,
provider_data: Option<&str>,
photo_url: Option<&str>,
photo_size: Option<i64>,
photo_width: Option<i64>,
photo_height: Option<i64>,
need_name: Option<bool>,
need_phone_number: Option<bool>,
need_email: Option<bool>,
need_shipping_address: Option<bool>,
send_phone_number_to_provider: Option<bool>,
send_email_to_provider: Option<bool>,
is_flexible: Option<bool>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_invoice_raw( &self, chat_id: ChatId, title: &str, description: &str, payload: &str, currency: &str, prices: Vec<Value>, provider_token: Option<&str>, max_tip_amount: Option<i64>, suggested_tip_amounts: Option<Vec<i64>>, start_parameter: Option<&str>, provider_data: Option<&str>, photo_url: Option<&str>, photo_size: Option<i64>, photo_width: Option<i64>, photo_height: Option<i64>, need_name: Option<bool>, need_phone_number: Option<bool>, need_email: Option<bool>, need_shipping_address: Option<bool>, send_phone_number_to_provider: Option<bool>, send_email_to_provider: Option<bool>, is_flexible: Option<bool>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends an invoice. Internal raw method used by builder APIs.
Calls the Telegram sendInvoice API method.
Sourcepub async fn create_invoice_link_raw(
&self,
title: &str,
description: &str,
payload: &str,
currency: &str,
prices: Vec<Value>,
provider_token: Option<&str>,
max_tip_amount: Option<i64>,
suggested_tip_amounts: Option<Vec<i64>>,
provider_data: Option<&str>,
photo_url: Option<&str>,
photo_size: Option<i64>,
photo_width: Option<i64>,
photo_height: Option<i64>,
need_name: Option<bool>,
need_phone_number: Option<bool>,
need_email: Option<bool>,
need_shipping_address: Option<bool>,
send_phone_number_to_provider: Option<bool>,
send_email_to_provider: Option<bool>,
is_flexible: Option<bool>,
subscription_period: Option<i64>,
business_connection_id: Option<&str>,
) -> Result<String, TelegramError>
pub async fn create_invoice_link_raw( &self, title: &str, description: &str, payload: &str, currency: &str, prices: Vec<Value>, provider_token: Option<&str>, max_tip_amount: Option<i64>, suggested_tip_amounts: Option<Vec<i64>>, provider_data: Option<&str>, photo_url: Option<&str>, photo_size: Option<i64>, photo_width: Option<i64>, photo_height: Option<i64>, need_name: Option<bool>, need_phone_number: Option<bool>, need_email: Option<bool>, need_shipping_address: Option<bool>, send_phone_number_to_provider: Option<bool>, send_email_to_provider: Option<bool>, is_flexible: Option<bool>, subscription_period: Option<i64>, business_connection_id: Option<&str>, ) -> Result<String, TelegramError>
Use this method to create a link for an invoice.
Calls the Telegram createInvoiceLink API method.
Sourcepub async fn answer_shipping_query_raw(
&self,
shipping_query_id: &str,
ok: bool,
shipping_options: Option<Vec<Value>>,
error_message: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn answer_shipping_query_raw( &self, shipping_query_id: &str, ok: bool, shipping_options: Option<Vec<Value>>, error_message: Option<&str>, ) -> Result<bool, TelegramError>
Answers a shipping query. Internal raw method.
Calls the Telegram answerShippingQuery API method.
Sourcepub async fn answer_pre_checkout_query_raw(
&self,
pre_checkout_query_id: &str,
ok: bool,
error_message: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn answer_pre_checkout_query_raw( &self, pre_checkout_query_id: &str, ok: bool, error_message: Option<&str>, ) -> Result<bool, TelegramError>
Answers a pre-checkout query. Internal raw method.
Calls the Telegram answerPreCheckoutQuery API method.
Sourcepub async fn refund_star_payment_raw(
&self,
user_id: i64,
telegram_payment_charge_id: &str,
) -> Result<bool, TelegramError>
pub async fn refund_star_payment_raw( &self, user_id: i64, telegram_payment_charge_id: &str, ) -> Result<bool, TelegramError>
Use this method to refund a successful payment in Telegram Stars.
Calls the Telegram refundStarPayment API method.
Sourcepub async fn get_star_transactions_raw(
&self,
offset: Option<i64>,
limit: Option<i64>,
) -> Result<StarTransactions, TelegramError>
pub async fn get_star_transactions_raw( &self, offset: Option<i64>, limit: Option<i64>, ) -> Result<StarTransactions, TelegramError>
Use this method to get the bot’s Telegram Star transactions.
Calls the Telegram getStarTransactions API method.
Sourcepub async fn edit_user_star_subscription_raw(
&self,
user_id: i64,
telegram_payment_charge_id: &str,
is_canceled: bool,
) -> Result<bool, TelegramError>
pub async fn edit_user_star_subscription_raw( &self, user_id: i64, telegram_payment_charge_id: &str, is_canceled: bool, ) -> Result<bool, TelegramError>
Use this method to allow or disallow the user to create Telegram Star subscriptions.
Calls the Telegram editUserStarSubscription API method.
Sourcepub async fn get_my_star_balance_raw(&self) -> Result<StarAmount, TelegramError>
pub async fn get_my_star_balance_raw(&self) -> Result<StarAmount, TelegramError>
Use this method to get the bot’s current Telegram Star balance.
Calls the Telegram getMyStarBalance API method.
Source§impl Bot
impl Bot
Sourcepub async fn set_message_reaction_raw(
&self,
chat_id: ChatId,
message_id: i64,
reaction: Option<Vec<Value>>,
is_big: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn set_message_reaction_raw( &self, chat_id: ChatId, message_id: i64, reaction: Option<Vec<Value>>, is_big: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to change the chosen reactions on a message.
Calls the Telegram setMessageReaction API method.
Sourcepub async fn get_user_chat_boosts_raw(
&self,
chat_id: ChatId,
user_id: i64,
) -> Result<UserChatBoosts, TelegramError>
pub async fn get_user_chat_boosts_raw( &self, chat_id: ChatId, user_id: i64, ) -> Result<UserChatBoosts, TelegramError>
Use this method to get the list of boosts added to a chat by a user.
Calls the Telegram getUserChatBoosts API method.
Source§impl Bot
impl Bot
Sourcepub async fn send_sticker_raw(
&self,
chat_id: ChatId,
sticker: InputFile,
emoji: Option<&str>,
disable_notification: Option<bool>,
protect_content: Option<bool>,
reply_parameters: Option<ReplyParameters>,
reply_markup: Option<Value>,
message_thread_id: Option<i64>,
business_connection_id: Option<&str>,
message_effect_id: Option<&str>,
allow_paid_broadcast: Option<bool>,
direct_messages_topic_id: Option<i64>,
suggested_post_parameters: Option<SuggestedPostParameters>,
) -> Result<Message, TelegramError>
pub async fn send_sticker_raw( &self, chat_id: ChatId, sticker: InputFile, emoji: Option<&str>, disable_notification: Option<bool>, protect_content: Option<bool>, reply_parameters: Option<ReplyParameters>, reply_markup: Option<Value>, message_thread_id: Option<i64>, business_connection_id: Option<&str>, message_effect_id: Option<&str>, allow_paid_broadcast: Option<bool>, direct_messages_topic_id: Option<i64>, suggested_post_parameters: Option<SuggestedPostParameters>, ) -> Result<Message, TelegramError>
Sends a sticker. Internal raw method used by builder APIs.
Calls the Telegram sendSticker API method.
Sourcepub async fn get_sticker_set_raw(
&self,
name: &str,
) -> Result<StickerSet, TelegramError>
pub async fn get_sticker_set_raw( &self, name: &str, ) -> Result<StickerSet, TelegramError>
Use this method to get a sticker set by name.
Calls the Telegram getStickerSet API method.
Sourcepub async fn get_custom_emoji_stickers_raw(
&self,
custom_emoji_ids: Vec<String>,
) -> Result<Vec<Sticker>, TelegramError>
pub async fn get_custom_emoji_stickers_raw( &self, custom_emoji_ids: Vec<String>, ) -> Result<Vec<Sticker>, TelegramError>
Use this method to get information about custom emoji stickers by their identifiers.
Calls the Telegram getCustomEmojiStickers API method.
Sourcepub async fn upload_sticker_file_raw(
&self,
user_id: i64,
sticker: InputFile,
sticker_format: &str,
) -> Result<File, TelegramError>
pub async fn upload_sticker_file_raw( &self, user_id: i64, sticker: InputFile, sticker_format: &str, ) -> Result<File, TelegramError>
Use this method to upload a sticker file for later use in sticker sets.
Calls the Telegram uploadStickerFile API method.
Sourcepub async fn create_new_sticker_set_raw(
&self,
user_id: i64,
name: &str,
title: &str,
stickers: Vec<Value>,
sticker_type: Option<&str>,
needs_repainting: Option<bool>,
) -> Result<bool, TelegramError>
pub async fn create_new_sticker_set_raw( &self, user_id: i64, name: &str, title: &str, stickers: Vec<Value>, sticker_type: Option<&str>, needs_repainting: Option<bool>, ) -> Result<bool, TelegramError>
Use this method to create a new sticker set owned by a user.
Calls the Telegram createNewStickerSet API method.
Sourcepub async fn add_sticker_to_set_raw(
&self,
user_id: i64,
name: &str,
sticker: Value,
) -> Result<bool, TelegramError>
pub async fn add_sticker_to_set_raw( &self, user_id: i64, name: &str, sticker: Value, ) -> Result<bool, TelegramError>
Use this method to add a new sticker to an existing sticker set.
Calls the Telegram addStickerToSet API method.
Sourcepub async fn set_sticker_position_in_set_raw(
&self,
sticker: &str,
position: i64,
) -> Result<bool, TelegramError>
pub async fn set_sticker_position_in_set_raw( &self, sticker: &str, position: i64, ) -> Result<bool, TelegramError>
Use this method to move a sticker in a set to a specific position.
Calls the Telegram setStickerPositionInSet API method.
Sourcepub async fn delete_sticker_from_set_raw(
&self,
sticker: &str,
) -> Result<bool, TelegramError>
pub async fn delete_sticker_from_set_raw( &self, sticker: &str, ) -> Result<bool, TelegramError>
Use this method to delete a sticker from a set.
Calls the Telegram deleteStickerFromSet API method.
Sourcepub async fn replace_sticker_in_set_raw(
&self,
user_id: i64,
name: &str,
old_sticker: &str,
sticker: Value,
) -> Result<bool, TelegramError>
pub async fn replace_sticker_in_set_raw( &self, user_id: i64, name: &str, old_sticker: &str, sticker: Value, ) -> Result<bool, TelegramError>
Use this method to replace an existing sticker in a sticker set with a new one.
Calls the Telegram replaceStickerInSet API method.
Sourcepub async fn set_sticker_emoji_list_raw(
&self,
sticker: &str,
emoji_list: Vec<String>,
) -> Result<bool, TelegramError>
pub async fn set_sticker_emoji_list_raw( &self, sticker: &str, emoji_list: Vec<String>, ) -> Result<bool, TelegramError>
Use this method to change the list of emoji assigned to a regular or custom emoji sticker.
Calls the Telegram setStickerEmojiList API method.
Sourcepub async fn set_sticker_keywords_raw(
&self,
sticker: &str,
keywords: Option<Vec<String>>,
) -> Result<bool, TelegramError>
pub async fn set_sticker_keywords_raw( &self, sticker: &str, keywords: Option<Vec<String>>, ) -> Result<bool, TelegramError>
Use this method to change search keywords assigned to a regular or custom emoji sticker.
Calls the Telegram setStickerKeywords API method.
Sourcepub async fn set_sticker_mask_position_raw(
&self,
sticker: &str,
mask_position: Option<MaskPosition>,
) -> Result<bool, TelegramError>
pub async fn set_sticker_mask_position_raw( &self, sticker: &str, mask_position: Option<MaskPosition>, ) -> Result<bool, TelegramError>
Use this method to change the mask position of a mask sticker.
Calls the Telegram setStickerMaskPosition API method.
Sourcepub async fn set_sticker_set_thumbnail_raw(
&self,
name: &str,
user_id: i64,
format: &str,
thumbnail: Option<InputFile>,
) -> Result<bool, TelegramError>
pub async fn set_sticker_set_thumbnail_raw( &self, name: &str, user_id: i64, format: &str, thumbnail: Option<InputFile>, ) -> Result<bool, TelegramError>
Use this method to set the thumbnail of a regular or mask sticker set.
Calls the Telegram setStickerSetThumbnail API method.
Sourcepub async fn set_sticker_set_title_raw(
&self,
name: &str,
title: &str,
) -> Result<bool, TelegramError>
pub async fn set_sticker_set_title_raw( &self, name: &str, title: &str, ) -> Result<bool, TelegramError>
Use this method to set the title of a created sticker set.
Calls the Telegram setStickerSetTitle API method.
Sourcepub async fn set_custom_emoji_sticker_set_thumbnail_raw(
&self,
name: &str,
custom_emoji_id: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn set_custom_emoji_sticker_set_thumbnail_raw( &self, name: &str, custom_emoji_id: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to set the thumbnail of a custom emoji sticker set.
Calls the Telegram setCustomEmojiStickerSetThumbnail API method.
Sourcepub async fn delete_sticker_set_raw(
&self,
name: &str,
) -> Result<bool, TelegramError>
pub async fn delete_sticker_set_raw( &self, name: &str, ) -> Result<bool, TelegramError>
Use this method to delete a sticker set that was created by the bot.
Calls the Telegram deleteStickerSet API method.
Sourcepub async fn get_forum_topic_icon_stickers_raw(
&self,
) -> Result<Vec<Sticker>, TelegramError>
pub async fn get_forum_topic_icon_stickers_raw( &self, ) -> Result<Vec<Sticker>, TelegramError>
Use this method to get custom emoji stickers which can be used as a forum topic icon.
Calls the Telegram getForumTopicIconStickers API method.
Source§impl Bot
impl Bot
Sourcepub async fn post_story_raw(
&self,
business_connection_id: &str,
content: Value,
active_period: i64,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
areas: Option<Vec<Value>>,
post_to_chat_page: Option<bool>,
protect_content: Option<bool>,
) -> Result<Story, TelegramError>
pub async fn post_story_raw( &self, business_connection_id: &str, content: Value, active_period: i64, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, areas: Option<Vec<Value>>, post_to_chat_page: Option<bool>, protect_content: Option<bool>, ) -> Result<Story, TelegramError>
Use this method to post a story on behalf of a managed business account.
Calls the Telegram postStory API method.
Sourcepub async fn edit_story_raw(
&self,
business_connection_id: &str,
story_id: i64,
content: Value,
caption: Option<&str>,
parse_mode: Option<&str>,
caption_entities: Option<Vec<MessageEntity>>,
areas: Option<Vec<Value>>,
) -> Result<Story, TelegramError>
pub async fn edit_story_raw( &self, business_connection_id: &str, story_id: i64, content: Value, caption: Option<&str>, parse_mode: Option<&str>, caption_entities: Option<Vec<MessageEntity>>, areas: Option<Vec<Value>>, ) -> Result<Story, TelegramError>
Use this method to edit a story posted on behalf of a managed business account.
Calls the Telegram editStory API method.
Sourcepub async fn delete_story_raw(
&self,
business_connection_id: &str,
story_id: i64,
) -> Result<bool, TelegramError>
pub async fn delete_story_raw( &self, business_connection_id: &str, story_id: i64, ) -> Result<bool, TelegramError>
Use this method to delete a story posted on behalf of a managed business account.
Calls the Telegram deleteStory API method.
Sourcepub async fn repost_story_raw(
&self,
business_connection_id: &str,
from_chat_id: i64,
from_story_id: i64,
active_period: i64,
post_to_chat_page: Option<bool>,
protect_content: Option<bool>,
) -> Result<Story, TelegramError>
pub async fn repost_story_raw( &self, business_connection_id: &str, from_chat_id: i64, from_story_id: i64, active_period: i64, post_to_chat_page: Option<bool>, protect_content: Option<bool>, ) -> Result<Story, TelegramError>
Use this method to repost a story on behalf of a managed business account.
Calls the Telegram repostStory API method.
Source§impl Bot
impl Bot
Sourcepub async fn approve_suggested_post_raw(
&self,
chat_id: i64,
message_id: i64,
send_date: Option<i64>,
) -> Result<bool, TelegramError>
pub async fn approve_suggested_post_raw( &self, chat_id: i64, message_id: i64, send_date: Option<i64>, ) -> Result<bool, TelegramError>
Use this method to approve a suggested post in a channel managed by the bot.
Calls the Telegram approveSuggestedPost API method.
Sourcepub async fn decline_suggested_post_raw(
&self,
chat_id: i64,
message_id: i64,
comment: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn decline_suggested_post_raw( &self, chat_id: i64, message_id: i64, comment: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to decline a suggested post in a channel managed by the bot.
Calls the Telegram declineSuggestedPost API method.
Source§impl Bot
impl Bot
Sourcepub async fn get_user_profile_photos_raw(
&self,
user_id: i64,
offset: Option<i64>,
limit: Option<i64>,
) -> Result<UserProfilePhotos, TelegramError>
pub async fn get_user_profile_photos_raw( &self, user_id: i64, offset: Option<i64>, limit: Option<i64>, ) -> Result<UserProfilePhotos, TelegramError>
Use this method to get a list of profile pictures for a user.
Calls the Telegram getUserProfilePhotos API method.
Sourcepub async fn get_user_profile_audios_raw(
&self,
user_id: i64,
offset: Option<i64>,
limit: Option<i64>,
) -> Result<UserProfileAudios, TelegramError>
pub async fn get_user_profile_audios_raw( &self, user_id: i64, offset: Option<i64>, limit: Option<i64>, ) -> Result<UserProfileAudios, TelegramError>
Use this method to get a list of profile audios for a user.
Calls the Telegram getUserProfileAudios API method.
Sourcepub async fn set_user_emoji_status_raw(
&self,
user_id: i64,
emoji_status_custom_emoji_id: Option<&str>,
emoji_status_expiration_date: Option<i64>,
) -> Result<bool, TelegramError>
pub async fn set_user_emoji_status_raw( &self, user_id: i64, emoji_status_custom_emoji_id: Option<&str>, emoji_status_expiration_date: Option<i64>, ) -> Result<bool, TelegramError>
Use this method to change the emoji status for a given user.
Calls the Telegram setUserEmojiStatus API method.
Sourcepub async fn set_my_profile_photo_raw(
&self,
photo: Value,
) -> Result<bool, TelegramError>
pub async fn set_my_profile_photo_raw( &self, photo: Value, ) -> Result<bool, TelegramError>
Use this method to set the bot’s profile photo.
Calls the Telegram setMyProfilePhoto API method.
Sourcepub async fn remove_my_profile_photo_raw(&self) -> Result<bool, TelegramError>
pub async fn remove_my_profile_photo_raw(&self) -> Result<bool, TelegramError>
Use this method to remove the bot’s profile photo.
Calls the Telegram removeMyProfilePhoto API method.
Sourcepub async fn get_file_raw(&self, file_id: &str) -> Result<File, TelegramError>
pub async fn get_file_raw(&self, file_id: &str) -> Result<File, TelegramError>
Gets basic info about a file and prepares it for downloading. Internal raw method used by builder APIs.
Calls the Telegram getFile API method.
Source§impl Bot
impl Bot
Sourcepub async fn verify_chat_raw(
&self,
chat_id: ChatId,
custom_description: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn verify_chat_raw( &self, chat_id: ChatId, custom_description: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to verify a chat on behalf of the organization that the bot represents.
Calls the Telegram verifyChat API method.
Sourcepub async fn verify_user_raw(
&self,
user_id: i64,
custom_description: Option<&str>,
) -> Result<bool, TelegramError>
pub async fn verify_user_raw( &self, user_id: i64, custom_description: Option<&str>, ) -> Result<bool, TelegramError>
Use this method to verify a user on behalf of the organization that the bot represents.
Calls the Telegram verifyUser API method.
Sourcepub async fn remove_chat_verification_raw(
&self,
chat_id: ChatId,
) -> Result<bool, TelegramError>
pub async fn remove_chat_verification_raw( &self, chat_id: ChatId, ) -> Result<bool, TelegramError>
Use this method to remove verification from a chat.
Calls the Telegram removeChatVerification API method.
Sourcepub async fn remove_user_verification_raw(
&self,
user_id: i64,
) -> Result<bool, TelegramError>
pub async fn remove_user_verification_raw( &self, user_id: i64, ) -> Result<bool, TelegramError>
Use this method to remove verification from a user.
Calls the Telegram removeUserVerification API method.
Source§impl Bot
impl Bot
Sourcepub fn send_message(
&self,
chat_id: impl Into<ChatId>,
text: impl Into<String>,
) -> SendMessageBuilder<'_>
pub fn send_message( &self, chat_id: impl Into<ChatId>, text: impl Into<String>, ) -> SendMessageBuilder<'_>
Build a sendMessage request.
Sourcepub fn send_photo(
&self,
chat_id: impl Into<ChatId>,
photo: InputFile,
) -> SendPhotoBuilder<'_>
pub fn send_photo( &self, chat_id: impl Into<ChatId>, photo: InputFile, ) -> SendPhotoBuilder<'_>
Build a sendPhoto request.
Sourcepub fn send_document(
&self,
chat_id: impl Into<ChatId>,
document: InputFile,
) -> SendDocumentBuilder<'_>
pub fn send_document( &self, chat_id: impl Into<ChatId>, document: InputFile, ) -> SendDocumentBuilder<'_>
Build a sendDocument request.
Sourcepub fn send_video(
&self,
chat_id: impl Into<ChatId>,
video: InputFile,
) -> SendVideoBuilder<'_>
pub fn send_video( &self, chat_id: impl Into<ChatId>, video: InputFile, ) -> SendVideoBuilder<'_>
Build a sendVideo request.
Sourcepub fn send_audio(
&self,
chat_id: impl Into<ChatId>,
audio: InputFile,
) -> SendAudioBuilder<'_>
pub fn send_audio( &self, chat_id: impl Into<ChatId>, audio: InputFile, ) -> SendAudioBuilder<'_>
Build a sendAudio request.
Sourcepub fn send_animation(
&self,
chat_id: impl Into<ChatId>,
animation: InputFile,
) -> SendAnimationBuilder<'_>
pub fn send_animation( &self, chat_id: impl Into<ChatId>, animation: InputFile, ) -> SendAnimationBuilder<'_>
Build a sendAnimation request.
Sourcepub fn send_voice(
&self,
chat_id: impl Into<ChatId>,
voice: InputFile,
) -> SendVoiceBuilder<'_>
pub fn send_voice( &self, chat_id: impl Into<ChatId>, voice: InputFile, ) -> SendVoiceBuilder<'_>
Build a sendVoice request.
Sourcepub fn send_video_note(
&self,
chat_id: impl Into<ChatId>,
video_note: InputFile,
) -> SendVideoNoteBuilder<'_>
pub fn send_video_note( &self, chat_id: impl Into<ChatId>, video_note: InputFile, ) -> SendVideoNoteBuilder<'_>
Build a sendVideoNote request.
Sourcepub fn send_location(
&self,
chat_id: impl Into<ChatId>,
latitude: f64,
longitude: f64,
) -> SendLocationBuilder<'_>
pub fn send_location( &self, chat_id: impl Into<ChatId>, latitude: f64, longitude: f64, ) -> SendLocationBuilder<'_>
Build a sendLocation request.
Sourcepub fn send_venue(
&self,
chat_id: impl Into<ChatId>,
latitude: f64,
longitude: f64,
title: impl Into<String>,
address: impl Into<String>,
) -> SendVenueBuilder<'_>
pub fn send_venue( &self, chat_id: impl Into<ChatId>, latitude: f64, longitude: f64, title: impl Into<String>, address: impl Into<String>, ) -> SendVenueBuilder<'_>
Build a sendVenue request.
Sourcepub fn send_contact(
&self,
chat_id: impl Into<ChatId>,
phone_number: impl Into<String>,
first_name: impl Into<String>,
) -> SendContactBuilder<'_>
pub fn send_contact( &self, chat_id: impl Into<ChatId>, phone_number: impl Into<String>, first_name: impl Into<String>, ) -> SendContactBuilder<'_>
Build a sendContact request.
Sourcepub fn send_poll(
&self,
chat_id: impl Into<ChatId>,
question: impl Into<String>,
options: Vec<Value>,
) -> SendPollBuilder<'_>
pub fn send_poll( &self, chat_id: impl Into<ChatId>, question: impl Into<String>, options: Vec<Value>, ) -> SendPollBuilder<'_>
Build a sendPoll request.
Sourcepub fn send_dice(&self, chat_id: impl Into<ChatId>) -> SendDiceBuilder<'_>
pub fn send_dice(&self, chat_id: impl Into<ChatId>) -> SendDiceBuilder<'_>
Build a sendDice request.
Sourcepub fn send_sticker(
&self,
chat_id: impl Into<ChatId>,
sticker: InputFile,
) -> SendStickerBuilder<'_>
pub fn send_sticker( &self, chat_id: impl Into<ChatId>, sticker: InputFile, ) -> SendStickerBuilder<'_>
Build a sendSticker request.
Sourcepub fn edit_message_text(
&self,
text: impl Into<String>,
) -> EditMessageTextBuilder<'_>
pub fn edit_message_text( &self, text: impl Into<String>, ) -> EditMessageTextBuilder<'_>
Build an editMessageText request.
Sourcepub fn edit_message_caption(&self) -> EditMessageCaptionBuilder<'_>
pub fn edit_message_caption(&self) -> EditMessageCaptionBuilder<'_>
Build an editMessageCaption request.
Sourcepub fn edit_message_media(&self, media: Value) -> EditMessageMediaBuilder<'_>
pub fn edit_message_media(&self, media: Value) -> EditMessageMediaBuilder<'_>
Build an editMessageMedia request.
Sourcepub fn edit_message_reply_markup(&self) -> EditMessageReplyMarkupBuilder<'_>
pub fn edit_message_reply_markup(&self) -> EditMessageReplyMarkupBuilder<'_>
Build an editMessageReplyMarkup request.
Sourcepub fn answer_callback_query(
&self,
callback_query_id: impl Into<String>,
) -> AnswerCallbackQueryBuilder<'_>
pub fn answer_callback_query( &self, callback_query_id: impl Into<String>, ) -> AnswerCallbackQueryBuilder<'_>
Build an answerCallbackQuery request.
Sourcepub fn answer_inline_query(
&self,
inline_query_id: impl Into<String>,
results: Vec<Value>,
) -> AnswerInlineQueryBuilder<'_>
pub fn answer_inline_query( &self, inline_query_id: impl Into<String>, results: Vec<Value>, ) -> AnswerInlineQueryBuilder<'_>
Build an answerInlineQuery request.
Sourcepub fn set_webhook(&self, url: impl Into<String>) -> SetWebhookBuilder<'_>
pub fn set_webhook(&self, url: impl Into<String>) -> SetWebhookBuilder<'_>
Build a setWebhook request.
Sourcepub fn delete_webhook(&self) -> DeleteWebhookBuilder<'_>
pub fn delete_webhook(&self) -> DeleteWebhookBuilder<'_>
Build a deleteWebhook request.
Sourcepub fn get_file(&self, file_id: impl Into<String>) -> GetFileBuilder<'_>
pub fn get_file(&self, file_id: impl Into<String>) -> GetFileBuilder<'_>
Build a getFile request.
Sourcepub fn send_invoice(
&self,
chat_id: impl Into<ChatId>,
title: impl Into<String>,
description: impl Into<String>,
payload: impl Into<String>,
currency: impl Into<String>,
prices: Vec<Value>,
) -> SendInvoiceBuilder<'_>
pub fn send_invoice( &self, chat_id: impl Into<ChatId>, title: impl Into<String>, description: impl Into<String>, payload: impl Into<String>, currency: impl Into<String>, prices: Vec<Value>, ) -> SendInvoiceBuilder<'_>
Build a sendInvoice request.
Sourcepub fn answer_shipping_query(
&self,
shipping_query_id: impl Into<String>,
ok: bool,
) -> AnswerShippingQueryBuilder<'_>
pub fn answer_shipping_query( &self, shipping_query_id: impl Into<String>, ok: bool, ) -> AnswerShippingQueryBuilder<'_>
Build an answerShippingQuery request.
Sourcepub fn answer_pre_checkout_query(
&self,
pre_checkout_query_id: impl Into<String>,
ok: bool,
) -> AnswerPreCheckoutQueryBuilder<'_>
pub fn answer_pre_checkout_query( &self, pre_checkout_query_id: impl Into<String>, ok: bool, ) -> AnswerPreCheckoutQueryBuilder<'_>
Build an answerPreCheckoutQuery request.
Source§impl Bot
impl Bot
Sourcepub fn get_managed_bot_token(
&self,
bot_user_id: i64,
) -> GetManagedBotTokenBuilder<'_>
pub fn get_managed_bot_token( &self, bot_user_id: i64, ) -> GetManagedBotTokenBuilder<'_>
Build a getManagedBotToken request.
Sourcepub fn replace_managed_bot_token(
&self,
bot_user_id: i64,
) -> ReplaceManagedBotTokenBuilder<'_>
pub fn replace_managed_bot_token( &self, bot_user_id: i64, ) -> ReplaceManagedBotTokenBuilder<'_>
Build a replaceManagedBotToken request.
Build a savePreparedKeyboardButton request.
Sourcepub fn send_chat_action(
&self,
chat_id: impl Into<ChatId>,
action: impl Into<String>,
) -> SendChatActionBuilder<'_>
pub fn send_chat_action( &self, chat_id: impl Into<ChatId>, action: impl Into<String>, ) -> SendChatActionBuilder<'_>
Build a sendChatAction request.
Source§impl Bot
impl Bot
Sourcepub fn copy_message(
&self,
chat_id: impl Into<ChatId>,
from_chat_id: impl Into<ChatId>,
message_id: i64,
) -> CopyMessageBuilder<'_>
pub fn copy_message( &self, chat_id: impl Into<ChatId>, from_chat_id: impl Into<ChatId>, message_id: i64, ) -> CopyMessageBuilder<'_>
Build a copyMessage request.
Sourcepub fn copy_messages(
&self,
chat_id: impl Into<ChatId>,
from_chat_id: impl Into<ChatId>,
message_ids: Vec<i64>,
) -> CopyMessagesBuilder<'_>
pub fn copy_messages( &self, chat_id: impl Into<ChatId>, from_chat_id: impl Into<ChatId>, message_ids: Vec<i64>, ) -> CopyMessagesBuilder<'_>
Build a copyMessages request.
Sourcepub fn delete_message(
&self,
chat_id: impl Into<ChatId>,
message_id: i64,
) -> DeleteMessageBuilder<'_>
pub fn delete_message( &self, chat_id: impl Into<ChatId>, message_id: i64, ) -> DeleteMessageBuilder<'_>
Build a deleteMessage request.
Sourcepub fn delete_messages(
&self,
chat_id: impl Into<ChatId>,
message_ids: Vec<i64>,
) -> DeleteMessagesBuilder<'_>
pub fn delete_messages( &self, chat_id: impl Into<ChatId>, message_ids: Vec<i64>, ) -> DeleteMessagesBuilder<'_>
Build a deleteMessages request.
Sourcepub fn forward_message(
&self,
chat_id: impl Into<ChatId>,
from_chat_id: impl Into<ChatId>,
message_id: i64,
) -> ForwardMessageBuilder<'_>
pub fn forward_message( &self, chat_id: impl Into<ChatId>, from_chat_id: impl Into<ChatId>, message_id: i64, ) -> ForwardMessageBuilder<'_>
Build a forwardMessage request.
Sourcepub fn forward_messages(
&self,
chat_id: impl Into<ChatId>,
from_chat_id: impl Into<ChatId>,
message_ids: Vec<i64>,
) -> ForwardMessagesBuilder<'_>
pub fn forward_messages( &self, chat_id: impl Into<ChatId>, from_chat_id: impl Into<ChatId>, message_ids: Vec<i64>, ) -> ForwardMessagesBuilder<'_>
Build a forwardMessages request.
Sourcepub fn send_message_draft(
&self,
chat_id: i64,
draft_id: i64,
text: impl Into<String>,
) -> SendMessageDraftBuilder<'_>
pub fn send_message_draft( &self, chat_id: i64, draft_id: i64, text: impl Into<String>, ) -> SendMessageDraftBuilder<'_>
Build a sendMessageDraft request.
Sourcepub fn leave_chat(&self, chat_id: impl Into<ChatId>) -> LeaveChatBuilder<'_>
pub fn leave_chat(&self, chat_id: impl Into<ChatId>) -> LeaveChatBuilder<'_>
Build a leaveChat request.
Sourcepub fn get_chat(&self, chat_id: impl Into<ChatId>) -> GetChatBuilder<'_>
pub fn get_chat(&self, chat_id: impl Into<ChatId>) -> GetChatBuilder<'_>
Build a getChat request.
Sourcepub fn get_chat_administrators(
&self,
chat_id: impl Into<ChatId>,
) -> GetChatAdministratorsBuilder<'_>
pub fn get_chat_administrators( &self, chat_id: impl Into<ChatId>, ) -> GetChatAdministratorsBuilder<'_>
Build a getChatAdministrators request.
Sourcepub fn get_chat_member_count(
&self,
chat_id: impl Into<ChatId>,
) -> GetChatMemberCountBuilder<'_>
pub fn get_chat_member_count( &self, chat_id: impl Into<ChatId>, ) -> GetChatMemberCountBuilder<'_>
Build a getChatMemberCount request.
Sourcepub fn get_chat_member(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> GetChatMemberBuilder<'_>
pub fn get_chat_member( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> GetChatMemberBuilder<'_>
Build a getChatMember request.
Sourcepub fn ban_chat_member(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> BanChatMemberBuilder<'_>
pub fn ban_chat_member( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> BanChatMemberBuilder<'_>
Build a banChatMember request.
Sourcepub fn unban_chat_member(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> UnbanChatMemberBuilder<'_>
pub fn unban_chat_member( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> UnbanChatMemberBuilder<'_>
Build an unbanChatMember request.
Sourcepub fn ban_chat_sender_chat(
&self,
chat_id: impl Into<ChatId>,
sender_chat_id: i64,
) -> BanChatSenderChatBuilder<'_>
pub fn ban_chat_sender_chat( &self, chat_id: impl Into<ChatId>, sender_chat_id: i64, ) -> BanChatSenderChatBuilder<'_>
Build a banChatSenderChat request.
Sourcepub fn unban_chat_sender_chat(
&self,
chat_id: impl Into<ChatId>,
sender_chat_id: i64,
) -> UnbanChatSenderChatBuilder<'_>
pub fn unban_chat_sender_chat( &self, chat_id: impl Into<ChatId>, sender_chat_id: i64, ) -> UnbanChatSenderChatBuilder<'_>
Build an unbanChatSenderChat request.
Sourcepub fn restrict_chat_member(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
permissions: ChatPermissions,
) -> RestrictChatMemberBuilder<'_>
pub fn restrict_chat_member( &self, chat_id: impl Into<ChatId>, user_id: i64, permissions: ChatPermissions, ) -> RestrictChatMemberBuilder<'_>
Build a restrictChatMember request.
Sourcepub fn promote_chat_member(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> PromoteChatMemberBuilder<'_>
pub fn promote_chat_member( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> PromoteChatMemberBuilder<'_>
Build a promoteChatMember request.
Sourcepub fn set_chat_administrator_custom_title(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
custom_title: impl Into<String>,
) -> SetChatAdministratorCustomTitleBuilder<'_>
pub fn set_chat_administrator_custom_title( &self, chat_id: impl Into<ChatId>, user_id: i64, custom_title: impl Into<String>, ) -> SetChatAdministratorCustomTitleBuilder<'_>
Build a setChatAdministratorCustomTitle request.
Sourcepub fn set_chat_permissions(
&self,
chat_id: impl Into<ChatId>,
permissions: ChatPermissions,
) -> SetChatPermissionsBuilder<'_>
pub fn set_chat_permissions( &self, chat_id: impl Into<ChatId>, permissions: ChatPermissions, ) -> SetChatPermissionsBuilder<'_>
Build a setChatPermissions request.
Sourcepub fn set_chat_photo(
&self,
chat_id: impl Into<ChatId>,
photo: InputFile,
) -> SetChatPhotoBuilder<'_>
pub fn set_chat_photo( &self, chat_id: impl Into<ChatId>, photo: InputFile, ) -> SetChatPhotoBuilder<'_>
Build a setChatPhoto request.
Sourcepub fn delete_chat_photo(
&self,
chat_id: impl Into<ChatId>,
) -> DeleteChatPhotoBuilder<'_>
pub fn delete_chat_photo( &self, chat_id: impl Into<ChatId>, ) -> DeleteChatPhotoBuilder<'_>
Build a deleteChatPhoto request.
Sourcepub fn set_chat_title(
&self,
chat_id: impl Into<ChatId>,
title: impl Into<String>,
) -> SetChatTitleBuilder<'_>
pub fn set_chat_title( &self, chat_id: impl Into<ChatId>, title: impl Into<String>, ) -> SetChatTitleBuilder<'_>
Build a setChatTitle request.
Sourcepub fn set_chat_description(
&self,
chat_id: impl Into<ChatId>,
) -> SetChatDescriptionBuilder<'_>
pub fn set_chat_description( &self, chat_id: impl Into<ChatId>, ) -> SetChatDescriptionBuilder<'_>
Build a setChatDescription request.
Sourcepub fn set_chat_sticker_set(
&self,
chat_id: impl Into<ChatId>,
sticker_set_name: impl Into<String>,
) -> SetChatStickerSetBuilder<'_>
pub fn set_chat_sticker_set( &self, chat_id: impl Into<ChatId>, sticker_set_name: impl Into<String>, ) -> SetChatStickerSetBuilder<'_>
Build a setChatStickerSet request.
Sourcepub fn delete_chat_sticker_set(
&self,
chat_id: impl Into<ChatId>,
) -> DeleteChatStickerSetBuilder<'_>
pub fn delete_chat_sticker_set( &self, chat_id: impl Into<ChatId>, ) -> DeleteChatStickerSetBuilder<'_>
Build a deleteChatStickerSet request.
Sourcepub fn set_chat_member_tag(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> SetChatMemberTagBuilder<'_>
pub fn set_chat_member_tag( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> SetChatMemberTagBuilder<'_>
Build a setChatMemberTag request.
Sourcepub fn pin_chat_message(
&self,
chat_id: impl Into<ChatId>,
message_id: i64,
) -> PinChatMessageBuilder<'_>
pub fn pin_chat_message( &self, chat_id: impl Into<ChatId>, message_id: i64, ) -> PinChatMessageBuilder<'_>
Build a pinChatMessage request.
Sourcepub fn unpin_chat_message(
&self,
chat_id: impl Into<ChatId>,
) -> UnpinChatMessageBuilder<'_>
pub fn unpin_chat_message( &self, chat_id: impl Into<ChatId>, ) -> UnpinChatMessageBuilder<'_>
Build an unpinChatMessage request.
Sourcepub fn unpin_all_chat_messages(
&self,
chat_id: impl Into<ChatId>,
) -> UnpinAllChatMessagesBuilder<'_>
pub fn unpin_all_chat_messages( &self, chat_id: impl Into<ChatId>, ) -> UnpinAllChatMessagesBuilder<'_>
Build an unpinAllChatMessages request.
Sourcepub fn export_chat_invite_link(
&self,
chat_id: impl Into<ChatId>,
) -> ExportChatInviteLinkBuilder<'_>
pub fn export_chat_invite_link( &self, chat_id: impl Into<ChatId>, ) -> ExportChatInviteLinkBuilder<'_>
Build an exportChatInviteLink request.
Sourcepub fn create_chat_invite_link(
&self,
chat_id: impl Into<ChatId>,
) -> CreateChatInviteLinkBuilder<'_>
pub fn create_chat_invite_link( &self, chat_id: impl Into<ChatId>, ) -> CreateChatInviteLinkBuilder<'_>
Build a createChatInviteLink request.
Sourcepub fn edit_chat_invite_link(
&self,
chat_id: impl Into<ChatId>,
invite_link: impl Into<String>,
) -> EditChatInviteLinkBuilder<'_>
pub fn edit_chat_invite_link( &self, chat_id: impl Into<ChatId>, invite_link: impl Into<String>, ) -> EditChatInviteLinkBuilder<'_>
Build an editChatInviteLink request.
Sourcepub fn revoke_chat_invite_link(
&self,
chat_id: impl Into<ChatId>,
invite_link: impl Into<String>,
) -> RevokeChatInviteLinkBuilder<'_>
pub fn revoke_chat_invite_link( &self, chat_id: impl Into<ChatId>, invite_link: impl Into<String>, ) -> RevokeChatInviteLinkBuilder<'_>
Build a revokeChatInviteLink request.
Sourcepub fn create_chat_subscription_invite_link(
&self,
chat_id: impl Into<ChatId>,
subscription_period: i64,
subscription_price: i64,
) -> CreateChatSubscriptionInviteLinkBuilder<'_>
pub fn create_chat_subscription_invite_link( &self, chat_id: impl Into<ChatId>, subscription_period: i64, subscription_price: i64, ) -> CreateChatSubscriptionInviteLinkBuilder<'_>
Build a createChatSubscriptionInviteLink request.
Sourcepub fn edit_chat_subscription_invite_link(
&self,
chat_id: impl Into<ChatId>,
invite_link: impl Into<String>,
) -> EditChatSubscriptionInviteLinkBuilder<'_>
pub fn edit_chat_subscription_invite_link( &self, chat_id: impl Into<ChatId>, invite_link: impl Into<String>, ) -> EditChatSubscriptionInviteLinkBuilder<'_>
Build an editChatSubscriptionInviteLink request.
Sourcepub fn approve_chat_join_request(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> ApproveChatJoinRequestBuilder<'_>
pub fn approve_chat_join_request( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> ApproveChatJoinRequestBuilder<'_>
Build an approveChatJoinRequest request.
Sourcepub fn decline_chat_join_request(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> DeclineChatJoinRequestBuilder<'_>
pub fn decline_chat_join_request( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> DeclineChatJoinRequestBuilder<'_>
Build a declineChatJoinRequest request.
Source§impl Bot
impl Bot
Build a setChatMenuButton request.
Build a getChatMenuButton request.
Sourcepub fn set_my_commands(
&self,
commands: Vec<BotCommand>,
) -> SetMyCommandsBuilder<'_>
pub fn set_my_commands( &self, commands: Vec<BotCommand>, ) -> SetMyCommandsBuilder<'_>
Build a setMyCommands request.
Sourcepub fn get_my_commands(&self) -> GetMyCommandsBuilder<'_>
pub fn get_my_commands(&self) -> GetMyCommandsBuilder<'_>
Build a getMyCommands request.
Sourcepub fn delete_my_commands(&self) -> DeleteMyCommandsBuilder<'_>
pub fn delete_my_commands(&self) -> DeleteMyCommandsBuilder<'_>
Build a deleteMyCommands request.
Sourcepub fn set_my_default_administrator_rights(
&self,
) -> SetMyDefaultAdministratorRightsBuilder<'_>
pub fn set_my_default_administrator_rights( &self, ) -> SetMyDefaultAdministratorRightsBuilder<'_>
Build a setMyDefaultAdministratorRights request.
Sourcepub fn get_my_default_administrator_rights(
&self,
) -> GetMyDefaultAdministratorRightsBuilder<'_>
pub fn get_my_default_administrator_rights( &self, ) -> GetMyDefaultAdministratorRightsBuilder<'_>
Build a getMyDefaultAdministratorRights request.
Sourcepub fn set_my_description(&self) -> SetMyDescriptionBuilder<'_>
pub fn set_my_description(&self) -> SetMyDescriptionBuilder<'_>
Build a setMyDescription request.
Sourcepub fn get_my_description(&self) -> GetMyDescriptionBuilder<'_>
pub fn get_my_description(&self) -> GetMyDescriptionBuilder<'_>
Build a getMyDescription request.
Sourcepub fn set_my_short_description(&self) -> SetMyShortDescriptionBuilder<'_>
pub fn set_my_short_description(&self) -> SetMyShortDescriptionBuilder<'_>
Build a setMyShortDescription request.
Sourcepub fn get_my_short_description(&self) -> GetMyShortDescriptionBuilder<'_>
pub fn get_my_short_description(&self) -> GetMyShortDescriptionBuilder<'_>
Build a getMyShortDescription request.
Sourcepub fn set_my_name(&self) -> SetMyNameBuilder<'_>
pub fn set_my_name(&self) -> SetMyNameBuilder<'_>
Build a setMyName request.
Sourcepub fn get_my_name(&self) -> GetMyNameBuilder<'_>
pub fn get_my_name(&self) -> GetMyNameBuilder<'_>
Build a getMyName request.
Sourcepub fn create_forum_topic(
&self,
chat_id: impl Into<ChatId>,
name: impl Into<String>,
) -> CreateForumTopicBuilder<'_>
pub fn create_forum_topic( &self, chat_id: impl Into<ChatId>, name: impl Into<String>, ) -> CreateForumTopicBuilder<'_>
Build a createForumTopic request.
Sourcepub fn edit_forum_topic(
&self,
chat_id: impl Into<ChatId>,
message_thread_id: i64,
) -> EditForumTopicBuilder<'_>
pub fn edit_forum_topic( &self, chat_id: impl Into<ChatId>, message_thread_id: i64, ) -> EditForumTopicBuilder<'_>
Build an editForumTopic request.
Sourcepub fn close_forum_topic(
&self,
chat_id: impl Into<ChatId>,
message_thread_id: i64,
) -> CloseForumTopicBuilder<'_>
pub fn close_forum_topic( &self, chat_id: impl Into<ChatId>, message_thread_id: i64, ) -> CloseForumTopicBuilder<'_>
Build a closeForumTopic request.
Sourcepub fn reopen_forum_topic(
&self,
chat_id: impl Into<ChatId>,
message_thread_id: i64,
) -> ReopenForumTopicBuilder<'_>
pub fn reopen_forum_topic( &self, chat_id: impl Into<ChatId>, message_thread_id: i64, ) -> ReopenForumTopicBuilder<'_>
Build a reopenForumTopic request.
Sourcepub fn delete_forum_topic(
&self,
chat_id: impl Into<ChatId>,
message_thread_id: i64,
) -> DeleteForumTopicBuilder<'_>
pub fn delete_forum_topic( &self, chat_id: impl Into<ChatId>, message_thread_id: i64, ) -> DeleteForumTopicBuilder<'_>
Build a deleteForumTopic request.
Sourcepub fn unpin_all_forum_topic_messages(
&self,
chat_id: impl Into<ChatId>,
message_thread_id: i64,
) -> UnpinAllForumTopicMessagesBuilder<'_>
pub fn unpin_all_forum_topic_messages( &self, chat_id: impl Into<ChatId>, message_thread_id: i64, ) -> UnpinAllForumTopicMessagesBuilder<'_>
Build an unpinAllForumTopicMessages request.
Sourcepub fn unpin_all_general_forum_topic_messages(
&self,
chat_id: impl Into<ChatId>,
) -> UnpinAllGeneralForumTopicMessagesBuilder<'_>
pub fn unpin_all_general_forum_topic_messages( &self, chat_id: impl Into<ChatId>, ) -> UnpinAllGeneralForumTopicMessagesBuilder<'_>
Build an unpinAllGeneralForumTopicMessages request.
Sourcepub fn edit_general_forum_topic(
&self,
chat_id: impl Into<ChatId>,
name: impl Into<String>,
) -> EditGeneralForumTopicBuilder<'_>
pub fn edit_general_forum_topic( &self, chat_id: impl Into<ChatId>, name: impl Into<String>, ) -> EditGeneralForumTopicBuilder<'_>
Build an editGeneralForumTopic request.
Sourcepub fn close_general_forum_topic(
&self,
chat_id: impl Into<ChatId>,
) -> CloseGeneralForumTopicBuilder<'_>
pub fn close_general_forum_topic( &self, chat_id: impl Into<ChatId>, ) -> CloseGeneralForumTopicBuilder<'_>
Build a closeGeneralForumTopic request.
Sourcepub fn reopen_general_forum_topic(
&self,
chat_id: impl Into<ChatId>,
) -> ReopenGeneralForumTopicBuilder<'_>
pub fn reopen_general_forum_topic( &self, chat_id: impl Into<ChatId>, ) -> ReopenGeneralForumTopicBuilder<'_>
Build a reopenGeneralForumTopic request.
Sourcepub fn hide_general_forum_topic(
&self,
chat_id: impl Into<ChatId>,
) -> HideGeneralForumTopicBuilder<'_>
pub fn hide_general_forum_topic( &self, chat_id: impl Into<ChatId>, ) -> HideGeneralForumTopicBuilder<'_>
Build a hideGeneralForumTopic request.
Sourcepub fn unhide_general_forum_topic(
&self,
chat_id: impl Into<ChatId>,
) -> UnhideGeneralForumTopicBuilder<'_>
pub fn unhide_general_forum_topic( &self, chat_id: impl Into<ChatId>, ) -> UnhideGeneralForumTopicBuilder<'_>
Build an unhideGeneralForumTopic request.
Sourcepub fn get_sticker_set(
&self,
name: impl Into<String>,
) -> GetStickerSetBuilder<'_>
pub fn get_sticker_set( &self, name: impl Into<String>, ) -> GetStickerSetBuilder<'_>
Build a getStickerSet request.
Sourcepub fn get_custom_emoji_stickers(
&self,
custom_emoji_ids: Vec<String>,
) -> GetCustomEmojiStickersBuilder<'_>
pub fn get_custom_emoji_stickers( &self, custom_emoji_ids: Vec<String>, ) -> GetCustomEmojiStickersBuilder<'_>
Build a getCustomEmojiStickers request.
Sourcepub fn upload_sticker_file(
&self,
user_id: i64,
sticker: InputFile,
sticker_format: impl Into<String>,
) -> UploadStickerFileBuilder<'_>
pub fn upload_sticker_file( &self, user_id: i64, sticker: InputFile, sticker_format: impl Into<String>, ) -> UploadStickerFileBuilder<'_>
Build an uploadStickerFile request.
Sourcepub fn create_new_sticker_set(
&self,
user_id: i64,
name: impl Into<String>,
title: impl Into<String>,
stickers: Vec<Value>,
) -> CreateNewStickerSetBuilder<'_>
pub fn create_new_sticker_set( &self, user_id: i64, name: impl Into<String>, title: impl Into<String>, stickers: Vec<Value>, ) -> CreateNewStickerSetBuilder<'_>
Build a createNewStickerSet request.
Sourcepub fn add_sticker_to_set(
&self,
user_id: i64,
name: impl Into<String>,
sticker: Value,
) -> AddStickerToSetBuilder<'_>
pub fn add_sticker_to_set( &self, user_id: i64, name: impl Into<String>, sticker: Value, ) -> AddStickerToSetBuilder<'_>
Build an addStickerToSet request.
Sourcepub fn set_sticker_position_in_set(
&self,
sticker: impl Into<String>,
position: i64,
) -> SetStickerPositionInSetBuilder<'_>
pub fn set_sticker_position_in_set( &self, sticker: impl Into<String>, position: i64, ) -> SetStickerPositionInSetBuilder<'_>
Build a setStickerPositionInSet request.
Sourcepub fn delete_sticker_from_set(
&self,
sticker: impl Into<String>,
) -> DeleteStickerFromSetBuilder<'_>
pub fn delete_sticker_from_set( &self, sticker: impl Into<String>, ) -> DeleteStickerFromSetBuilder<'_>
Build a deleteStickerFromSet request.
Sourcepub fn replace_sticker_in_set(
&self,
user_id: i64,
name: impl Into<String>,
old_sticker: impl Into<String>,
sticker: Value,
) -> ReplaceStickerInSetBuilder<'_>
pub fn replace_sticker_in_set( &self, user_id: i64, name: impl Into<String>, old_sticker: impl Into<String>, sticker: Value, ) -> ReplaceStickerInSetBuilder<'_>
Build a replaceStickerInSet request.
Sourcepub fn set_sticker_emoji_list(
&self,
sticker: impl Into<String>,
emoji_list: Vec<String>,
) -> SetStickerEmojiListBuilder<'_>
pub fn set_sticker_emoji_list( &self, sticker: impl Into<String>, emoji_list: Vec<String>, ) -> SetStickerEmojiListBuilder<'_>
Build a setStickerEmojiList request.
Sourcepub fn set_sticker_keywords(
&self,
sticker: impl Into<String>,
) -> SetStickerKeywordsBuilder<'_>
pub fn set_sticker_keywords( &self, sticker: impl Into<String>, ) -> SetStickerKeywordsBuilder<'_>
Build a setStickerKeywords request.
Sourcepub fn set_sticker_mask_position(
&self,
sticker: impl Into<String>,
) -> SetStickerMaskPositionBuilder<'_>
pub fn set_sticker_mask_position( &self, sticker: impl Into<String>, ) -> SetStickerMaskPositionBuilder<'_>
Build a setStickerMaskPosition request.
Sourcepub fn set_sticker_set_thumbnail(
&self,
name: impl Into<String>,
user_id: i64,
format: impl Into<String>,
) -> SetStickerSetThumbnailBuilder<'_>
pub fn set_sticker_set_thumbnail( &self, name: impl Into<String>, user_id: i64, format: impl Into<String>, ) -> SetStickerSetThumbnailBuilder<'_>
Build a setStickerSetThumbnail request.
Sourcepub fn set_sticker_set_title(
&self,
name: impl Into<String>,
title: impl Into<String>,
) -> SetStickerSetTitleBuilder<'_>
pub fn set_sticker_set_title( &self, name: impl Into<String>, title: impl Into<String>, ) -> SetStickerSetTitleBuilder<'_>
Build a setStickerSetTitle request.
Sourcepub fn set_custom_emoji_sticker_set_thumbnail(
&self,
name: impl Into<String>,
) -> SetCustomEmojiStickerSetThumbnailBuilder<'_>
pub fn set_custom_emoji_sticker_set_thumbnail( &self, name: impl Into<String>, ) -> SetCustomEmojiStickerSetThumbnailBuilder<'_>
Build a setCustomEmojiStickerSetThumbnail request.
Sourcepub fn delete_sticker_set(
&self,
name: impl Into<String>,
) -> DeleteStickerSetBuilder<'_>
pub fn delete_sticker_set( &self, name: impl Into<String>, ) -> DeleteStickerSetBuilder<'_>
Build a deleteStickerSet request.
Sourcepub fn get_forum_topic_icon_stickers(
&self,
) -> GetForumTopicIconStickersBuilder<'_>
pub fn get_forum_topic_icon_stickers( &self, ) -> GetForumTopicIconStickersBuilder<'_>
Build a getForumTopicIconStickers request.
Source§impl Bot
impl Bot
Sourcepub fn get_business_connection(
&self,
business_connection_id: impl Into<String>,
) -> GetBusinessConnectionBuilder<'_>
pub fn get_business_connection( &self, business_connection_id: impl Into<String>, ) -> GetBusinessConnectionBuilder<'_>
Build a getBusinessConnection request.
Sourcepub fn get_business_account_gifts(
&self,
business_connection_id: impl Into<String>,
) -> GetBusinessAccountGiftsBuilder<'_>
pub fn get_business_account_gifts( &self, business_connection_id: impl Into<String>, ) -> GetBusinessAccountGiftsBuilder<'_>
Build a getBusinessAccountGifts request.
Sourcepub fn get_business_account_star_balance(
&self,
business_connection_id: impl Into<String>,
) -> GetBusinessAccountStarBalanceBuilder<'_>
pub fn get_business_account_star_balance( &self, business_connection_id: impl Into<String>, ) -> GetBusinessAccountStarBalanceBuilder<'_>
Build a getBusinessAccountStarBalance request.
Sourcepub fn read_business_message(
&self,
business_connection_id: impl Into<String>,
chat_id: i64,
message_id: i64,
) -> ReadBusinessMessageBuilder<'_>
pub fn read_business_message( &self, business_connection_id: impl Into<String>, chat_id: i64, message_id: i64, ) -> ReadBusinessMessageBuilder<'_>
Build a readBusinessMessage request.
Sourcepub fn delete_business_messages(
&self,
business_connection_id: impl Into<String>,
message_ids: Vec<i64>,
) -> DeleteBusinessMessagesBuilder<'_>
pub fn delete_business_messages( &self, business_connection_id: impl Into<String>, message_ids: Vec<i64>, ) -> DeleteBusinessMessagesBuilder<'_>
Build a deleteBusinessMessages request.
Sourcepub fn set_business_account_name(
&self,
business_connection_id: impl Into<String>,
first_name: impl Into<String>,
) -> SetBusinessAccountNameBuilder<'_>
pub fn set_business_account_name( &self, business_connection_id: impl Into<String>, first_name: impl Into<String>, ) -> SetBusinessAccountNameBuilder<'_>
Build a setBusinessAccountName request.
Sourcepub fn set_business_account_username(
&self,
business_connection_id: impl Into<String>,
) -> SetBusinessAccountUsernameBuilder<'_>
pub fn set_business_account_username( &self, business_connection_id: impl Into<String>, ) -> SetBusinessAccountUsernameBuilder<'_>
Build a setBusinessAccountUsername request.
Sourcepub fn set_business_account_bio(
&self,
business_connection_id: impl Into<String>,
) -> SetBusinessAccountBioBuilder<'_>
pub fn set_business_account_bio( &self, business_connection_id: impl Into<String>, ) -> SetBusinessAccountBioBuilder<'_>
Build a setBusinessAccountBio request.
Sourcepub fn set_business_account_gift_settings(
&self,
business_connection_id: impl Into<String>,
show_gift_button: bool,
accepted_gift_types: AcceptedGiftTypes,
) -> SetBusinessAccountGiftSettingsBuilder<'_>
pub fn set_business_account_gift_settings( &self, business_connection_id: impl Into<String>, show_gift_button: bool, accepted_gift_types: AcceptedGiftTypes, ) -> SetBusinessAccountGiftSettingsBuilder<'_>
Build a setBusinessAccountGiftSettings request.
Sourcepub fn set_business_account_profile_photo(
&self,
business_connection_id: impl Into<String>,
photo: Value,
) -> SetBusinessAccountProfilePhotoBuilder<'_>
pub fn set_business_account_profile_photo( &self, business_connection_id: impl Into<String>, photo: Value, ) -> SetBusinessAccountProfilePhotoBuilder<'_>
Build a setBusinessAccountProfilePhoto request.
Sourcepub fn remove_business_account_profile_photo(
&self,
business_connection_id: impl Into<String>,
) -> RemoveBusinessAccountProfilePhotoBuilder<'_>
pub fn remove_business_account_profile_photo( &self, business_connection_id: impl Into<String>, ) -> RemoveBusinessAccountProfilePhotoBuilder<'_>
Build a removeBusinessAccountProfilePhoto request.
Sourcepub fn convert_gift_to_stars(
&self,
business_connection_id: impl Into<String>,
owned_gift_id: impl Into<String>,
) -> ConvertGiftToStarsBuilder<'_>
pub fn convert_gift_to_stars( &self, business_connection_id: impl Into<String>, owned_gift_id: impl Into<String>, ) -> ConvertGiftToStarsBuilder<'_>
Build a convertGiftToStars request.
Sourcepub fn upgrade_gift(
&self,
business_connection_id: impl Into<String>,
owned_gift_id: impl Into<String>,
) -> UpgradeGiftBuilder<'_>
pub fn upgrade_gift( &self, business_connection_id: impl Into<String>, owned_gift_id: impl Into<String>, ) -> UpgradeGiftBuilder<'_>
Build an upgradeGift request.
Sourcepub fn transfer_gift(
&self,
business_connection_id: impl Into<String>,
owned_gift_id: impl Into<String>,
new_owner_chat_id: i64,
) -> TransferGiftBuilder<'_>
pub fn transfer_gift( &self, business_connection_id: impl Into<String>, owned_gift_id: impl Into<String>, new_owner_chat_id: i64, ) -> TransferGiftBuilder<'_>
Build a transferGift request.
Sourcepub fn transfer_business_account_stars(
&self,
business_connection_id: impl Into<String>,
star_count: i64,
) -> TransferBusinessAccountStarsBuilder<'_>
pub fn transfer_business_account_stars( &self, business_connection_id: impl Into<String>, star_count: i64, ) -> TransferBusinessAccountStarsBuilder<'_>
Build a transferBusinessAccountStars request.
Sourcepub fn create_invoice_link(
&self,
title: impl Into<String>,
description: impl Into<String>,
payload: impl Into<String>,
currency: impl Into<String>,
prices: Vec<Value>,
) -> CreateInvoiceLinkBuilder<'_>
pub fn create_invoice_link( &self, title: impl Into<String>, description: impl Into<String>, payload: impl Into<String>, currency: impl Into<String>, prices: Vec<Value>, ) -> CreateInvoiceLinkBuilder<'_>
Build a createInvoiceLink request.
Sourcepub fn edit_user_star_subscription(
&self,
user_id: i64,
telegram_payment_charge_id: impl Into<String>,
is_canceled: bool,
) -> EditUserStarSubscriptionBuilder<'_>
pub fn edit_user_star_subscription( &self, user_id: i64, telegram_payment_charge_id: impl Into<String>, is_canceled: bool, ) -> EditUserStarSubscriptionBuilder<'_>
Build an editUserStarSubscription request.
Sourcepub fn get_my_star_balance(&self) -> GetMyStarBalanceBuilder<'_>
pub fn get_my_star_balance(&self) -> GetMyStarBalanceBuilder<'_>
Build a getMyStarBalance request.
Sourcepub fn get_star_transactions(&self) -> GetStarTransactionsBuilder<'_>
pub fn get_star_transactions(&self) -> GetStarTransactionsBuilder<'_>
Build a getStarTransactions request.
Sourcepub fn refund_star_payment(
&self,
user_id: i64,
telegram_payment_charge_id: impl Into<String>,
) -> RefundStarPaymentBuilder<'_>
pub fn refund_star_payment( &self, user_id: i64, telegram_payment_charge_id: impl Into<String>, ) -> RefundStarPaymentBuilder<'_>
Build a refundStarPayment request.
Sourcepub fn get_available_gifts(&self) -> GetAvailableGiftsBuilder<'_>
pub fn get_available_gifts(&self) -> GetAvailableGiftsBuilder<'_>
Build a getAvailableGifts request.
Sourcepub fn send_gift(&self, gift_id: impl Into<String>) -> SendGiftBuilder<'_>
pub fn send_gift(&self, gift_id: impl Into<String>) -> SendGiftBuilder<'_>
Build a sendGift request.
Build a giftPremiumSubscription request.
Sourcepub fn get_user_gifts(&self, user_id: i64) -> GetUserGiftsBuilder<'_>
pub fn get_user_gifts(&self, user_id: i64) -> GetUserGiftsBuilder<'_>
Build a getUserGifts request.
Sourcepub fn get_chat_gifts(
&self,
chat_id: impl Into<ChatId>,
) -> GetChatGiftsBuilder<'_>
pub fn get_chat_gifts( &self, chat_id: impl Into<ChatId>, ) -> GetChatGiftsBuilder<'_>
Build a getChatGifts request.
Source§impl Bot
impl Bot
Sourcepub fn edit_message_live_location(
&self,
latitude: f64,
longitude: f64,
) -> EditMessageLiveLocationBuilder<'_>
pub fn edit_message_live_location( &self, latitude: f64, longitude: f64, ) -> EditMessageLiveLocationBuilder<'_>
Build an editMessageLiveLocation request.
Sourcepub fn stop_message_live_location(&self) -> StopMessageLiveLocationBuilder<'_>
pub fn stop_message_live_location(&self) -> StopMessageLiveLocationBuilder<'_>
Build a stopMessageLiveLocation request.
Sourcepub fn edit_message_checklist(
&self,
business_connection_id: impl Into<String>,
chat_id: i64,
message_id: i64,
checklist: InputChecklist,
) -> EditMessageChecklistBuilder<'_>
pub fn edit_message_checklist( &self, business_connection_id: impl Into<String>, chat_id: i64, message_id: i64, checklist: InputChecklist, ) -> EditMessageChecklistBuilder<'_>
Build an editMessageChecklist request.
Sourcepub fn stop_poll(
&self,
chat_id: impl Into<ChatId>,
message_id: i64,
) -> StopPollBuilder<'_>
pub fn stop_poll( &self, chat_id: impl Into<ChatId>, message_id: i64, ) -> StopPollBuilder<'_>
Build a stopPoll request.
Sourcepub fn send_game(
&self,
chat_id: i64,
game_short_name: impl Into<String>,
) -> SendGameBuilder<'_>
pub fn send_game( &self, chat_id: i64, game_short_name: impl Into<String>, ) -> SendGameBuilder<'_>
Build a sendGame request.
Sourcepub fn set_game_score(
&self,
user_id: i64,
score: i64,
) -> SetGameScoreBuilder<'_>
pub fn set_game_score( &self, user_id: i64, score: i64, ) -> SetGameScoreBuilder<'_>
Build a setGameScore request.
Sourcepub fn get_game_high_scores(&self, user_id: i64) -> GetGameHighScoresBuilder<'_>
pub fn get_game_high_scores(&self, user_id: i64) -> GetGameHighScoresBuilder<'_>
Build a getGameHighScores request.
Sourcepub fn save_prepared_inline_message(
&self,
user_id: i64,
result: Value,
) -> SavePreparedInlineMessageBuilder<'_>
pub fn save_prepared_inline_message( &self, user_id: i64, result: Value, ) -> SavePreparedInlineMessageBuilder<'_>
Build a savePreparedInlineMessage request.
Sourcepub fn answer_web_app_query(
&self,
web_app_query_id: impl Into<String>,
result: Value,
) -> AnswerWebAppQueryBuilder<'_>
pub fn answer_web_app_query( &self, web_app_query_id: impl Into<String>, result: Value, ) -> AnswerWebAppQueryBuilder<'_>
Build an answerWebAppQuery request.
Sourcepub fn send_media_group(
&self,
chat_id: impl Into<ChatId>,
media: Vec<Value>,
) -> SendMediaGroupBuilder<'_>
pub fn send_media_group( &self, chat_id: impl Into<ChatId>, media: Vec<Value>, ) -> SendMediaGroupBuilder<'_>
Build a sendMediaGroup request.
Sourcepub fn send_paid_media(
&self,
chat_id: impl Into<ChatId>,
star_count: i64,
media: Vec<Value>,
) -> SendPaidMediaBuilder<'_>
pub fn send_paid_media( &self, chat_id: impl Into<ChatId>, star_count: i64, media: Vec<Value>, ) -> SendPaidMediaBuilder<'_>
Build a sendPaidMedia request.
Sourcepub fn get_me(&self) -> GetMeBuilder<'_>
pub fn get_me(&self) -> GetMeBuilder<'_>
Build a getMe request.
Sourcepub fn log_out(&self) -> LogOutBuilder<'_>
pub fn log_out(&self) -> LogOutBuilder<'_>
Build a logOut request.
Sourcepub fn close(&self) -> CloseBuilder<'_>
pub fn close(&self) -> CloseBuilder<'_>
Build a close request.
Sourcepub fn get_updates(&self) -> GetUpdatesBuilder<'_>
pub fn get_updates(&self) -> GetUpdatesBuilder<'_>
Build a getUpdates request.
Sourcepub fn get_webhook_info(&self) -> GetWebhookInfoBuilder<'_>
pub fn get_webhook_info(&self) -> GetWebhookInfoBuilder<'_>
Build a getWebhookInfo request.
Sourcepub fn download_file(
&self,
file_path: impl Into<String>,
) -> DownloadFileBuilder<'_>
pub fn download_file( &self, file_path: impl Into<String>, ) -> DownloadFileBuilder<'_>
Build a downloadFile request.
Sourcepub fn send_checklist(
&self,
business_connection_id: impl Into<String>,
chat_id: i64,
checklist: InputChecklist,
) -> SendChecklistBuilder<'_>
pub fn send_checklist( &self, business_connection_id: impl Into<String>, chat_id: i64, checklist: InputChecklist, ) -> SendChecklistBuilder<'_>
Build a sendChecklist request.
Sourcepub fn set_passport_data_errors(
&self,
user_id: i64,
errors: Vec<Value>,
) -> SetPassportDataErrorsBuilder<'_>
pub fn set_passport_data_errors( &self, user_id: i64, errors: Vec<Value>, ) -> SetPassportDataErrorsBuilder<'_>
Build a setPassportDataErrors request.
Sourcepub fn set_message_reaction(
&self,
chat_id: impl Into<ChatId>,
message_id: i64,
) -> SetMessageReactionBuilder<'_>
pub fn set_message_reaction( &self, chat_id: impl Into<ChatId>, message_id: i64, ) -> SetMessageReactionBuilder<'_>
Build a setMessageReaction request.
Sourcepub fn get_user_chat_boosts(
&self,
chat_id: impl Into<ChatId>,
user_id: i64,
) -> GetUserChatBoostsBuilder<'_>
pub fn get_user_chat_boosts( &self, chat_id: impl Into<ChatId>, user_id: i64, ) -> GetUserChatBoostsBuilder<'_>
Build a getUserChatBoosts request.
Sourcepub fn post_story(
&self,
business_connection_id: impl Into<String>,
content: Value,
active_period: i64,
) -> PostStoryBuilder<'_>
pub fn post_story( &self, business_connection_id: impl Into<String>, content: Value, active_period: i64, ) -> PostStoryBuilder<'_>
Build a postStory request.
Sourcepub fn edit_story(
&self,
business_connection_id: impl Into<String>,
story_id: i64,
content: Value,
) -> EditStoryBuilder<'_>
pub fn edit_story( &self, business_connection_id: impl Into<String>, story_id: i64, content: Value, ) -> EditStoryBuilder<'_>
Build an editStory request.
Sourcepub fn delete_story(
&self,
business_connection_id: impl Into<String>,
story_id: i64,
) -> DeleteStoryBuilder<'_>
pub fn delete_story( &self, business_connection_id: impl Into<String>, story_id: i64, ) -> DeleteStoryBuilder<'_>
Build a deleteStory request.
Sourcepub fn repost_story(
&self,
business_connection_id: impl Into<String>,
from_chat_id: i64,
from_story_id: i64,
active_period: i64,
) -> RepostStoryBuilder<'_>
pub fn repost_story( &self, business_connection_id: impl Into<String>, from_chat_id: i64, from_story_id: i64, active_period: i64, ) -> RepostStoryBuilder<'_>
Build a repostStory request.
Sourcepub fn approve_suggested_post(
&self,
chat_id: i64,
message_id: i64,
) -> ApproveSuggestedPostBuilder<'_>
pub fn approve_suggested_post( &self, chat_id: i64, message_id: i64, ) -> ApproveSuggestedPostBuilder<'_>
Build an approveSuggestedPost request.
Sourcepub fn decline_suggested_post(
&self,
chat_id: i64,
message_id: i64,
) -> DeclineSuggestedPostBuilder<'_>
pub fn decline_suggested_post( &self, chat_id: i64, message_id: i64, ) -> DeclineSuggestedPostBuilder<'_>
Build a declineSuggestedPost request.
Sourcepub fn get_user_profile_photos(
&self,
user_id: i64,
) -> GetUserProfilePhotosBuilder<'_>
pub fn get_user_profile_photos( &self, user_id: i64, ) -> GetUserProfilePhotosBuilder<'_>
Build a getUserProfilePhotos request.
Sourcepub fn get_user_profile_audios(
&self,
user_id: i64,
) -> GetUserProfileAudiosBuilder<'_>
pub fn get_user_profile_audios( &self, user_id: i64, ) -> GetUserProfileAudiosBuilder<'_>
Build a getUserProfileAudios request.
Sourcepub fn set_user_emoji_status(
&self,
user_id: i64,
) -> SetUserEmojiStatusBuilder<'_>
pub fn set_user_emoji_status( &self, user_id: i64, ) -> SetUserEmojiStatusBuilder<'_>
Build a setUserEmojiStatus request.
Sourcepub fn set_my_profile_photo(&self, photo: Value) -> SetMyProfilePhotoBuilder<'_>
pub fn set_my_profile_photo(&self, photo: Value) -> SetMyProfilePhotoBuilder<'_>
Build a setMyProfilePhoto request.
Sourcepub fn remove_my_profile_photo(&self) -> RemoveMyProfilePhotoBuilder<'_>
pub fn remove_my_profile_photo(&self) -> RemoveMyProfilePhotoBuilder<'_>
Build a removeMyProfilePhoto request.
Sourcepub fn verify_chat(&self, chat_id: impl Into<ChatId>) -> VerifyChatBuilder<'_>
pub fn verify_chat(&self, chat_id: impl Into<ChatId>) -> VerifyChatBuilder<'_>
Build a verifyChat request.
Sourcepub fn verify_user(&self, user_id: i64) -> VerifyUserBuilder<'_>
pub fn verify_user(&self, user_id: i64) -> VerifyUserBuilder<'_>
Build a verifyUser request.
Sourcepub fn remove_chat_verification(
&self,
chat_id: impl Into<ChatId>,
) -> RemoveChatVerificationBuilder<'_>
pub fn remove_chat_verification( &self, chat_id: impl Into<ChatId>, ) -> RemoveChatVerificationBuilder<'_>
Build a removeChatVerification request.
Sourcepub fn remove_user_verification(
&self,
user_id: i64,
) -> RemoveUserVerificationBuilder<'_>
pub fn remove_user_verification( &self, user_id: i64, ) -> RemoveUserVerificationBuilder<'_>
Build a removeUserVerification request.