pub struct Bot { /* private fields */ }
Expand description
Provides methods to call the Bots API.
A Bot
lets you call methods from the methods
module.
let bot = tbot::from_env!("BOT_TOKEN");
let me = bot.get_me().call().await.unwrap();
dbg!(me);
Besides, a Bot
is used to construct an EventLoop
— a struct
responsible for configuring handlers and listening to updates.
Implementations§
Source§impl Bot
impl Bot
Sourcepub fn with_proxy(token: String, proxy: Proxy) -> Self
pub fn with_proxy(token: String, proxy: Proxy) -> Self
Constructs a Bot
with the provided proxy.
Sourcepub fn from_env_with_proxy(env_var: &'static str, proxy: Proxy) -> Self
pub fn from_env_with_proxy(env_var: &'static str, proxy: Proxy) -> Self
Like Bot::from_env
, but with a provided proxy.
Sourcepub fn event_loop(self) -> EventLoop
pub fn event_loop(self) -> EventLoop
Constructs an EventLoop
.
Sourcepub fn stateful_event_loop<S>(self, state: S) -> StatefulEventLoop<S>
pub fn stateful_event_loop<S>(self, state: S) -> StatefulEventLoop<S>
Constructs a stateful event loop.
Sourcepub fn add_sticker_to_set<'a>(
&'a self,
user_id: Id,
name: &'a str,
png_sticker: impl Into<StickerForStickerSet<'a>>,
emojis: &'a str,
) -> AddStickerToSet<'a>
pub fn add_sticker_to_set<'a>( &'a self, user_id: Id, name: &'a str, png_sticker: impl Into<StickerForStickerSet<'a>>, emojis: &'a str, ) -> AddStickerToSet<'a>
Adds a new sticker to an existing sticker set.
Sourcepub fn create_new_sticker_set<'a>(
&'a self,
user_id: Id,
name: &'a str,
title: &'a str,
png_sticker: impl Into<StickerForStickerSet<'a>>,
emojis: &'a str,
) -> CreateNewStickerSet<'a>
pub fn create_new_sticker_set<'a>( &'a self, user_id: Id, name: &'a str, title: &'a str, png_sticker: impl Into<StickerForStickerSet<'a>>, emojis: &'a str, ) -> CreateNewStickerSet<'a>
Creates a new sticker set.
Sourcepub fn delete_chat_photo<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> DeleteChatPhoto<'a>
pub fn delete_chat_photo<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> DeleteChatPhoto<'a>
Deletes a chat’s photo.
Sourcepub fn delete_chat_sticker_set<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> DeleteChatStickerSet<'a>
pub fn delete_chat_sticker_set<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> DeleteChatStickerSet<'a>
Deletes a chat’s sticker set.
Sourcepub fn delete_message<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
) -> DeleteMessage<'a>
pub fn delete_message<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> DeleteMessage<'a>
Deletes a message from a chat.
Sourcepub fn delete_sticker_from_set<'a>(
&'a self,
sticker: &'a str,
) -> DeleteStickerFromSet<'a>
pub fn delete_sticker_from_set<'a>( &'a self, sticker: &'a str, ) -> DeleteStickerFromSet<'a>
Deletes a sticker from a sticker set.
Sourcepub fn edit_inline_caption<'a>(
&'a self,
inline_message_id: Ref<'a>,
caption: impl Into<Text<'a>>,
) -> EditInlineCaption<'a>
pub fn edit_inline_caption<'a>( &'a self, inline_message_id: Ref<'a>, caption: impl Into<Text<'a>>, ) -> EditInlineCaption<'a>
Edits the caption of a media message sent via the inline mode.
Sourcepub fn edit_inline_location<'a>(
&'a self,
inline_message_id: Ref<'a>,
position: (f64, f64),
) -> EditInlineLocation<'a>
pub fn edit_inline_location<'a>( &'a self, inline_message_id: Ref<'a>, position: (f64, f64), ) -> EditInlineLocation<'a>
Edits a live location sent via the inline mode.
Sourcepub fn edit_inline_media<'a>(
&'a self,
inline_message_id: Ref<'a>,
media: impl Into<EditableMedia<'a>>,
) -> EditInlineMedia<'a>
pub fn edit_inline_media<'a>( &'a self, inline_message_id: Ref<'a>, media: impl Into<EditableMedia<'a>>, ) -> EditInlineMedia<'a>
Edits the media of a message sent via the inline mode.
Sourcepub fn edit_inline_reply_markup<'a>(
&'a self,
inline_message_id: Ref<'a>,
reply_markup: Keyboard<'a>,
) -> EditInlineReplyMarkup<'a>
pub fn edit_inline_reply_markup<'a>( &'a self, inline_message_id: Ref<'a>, reply_markup: Keyboard<'a>, ) -> EditInlineReplyMarkup<'a>
Edits the inline keyboard of a message sent via the inline mode.
Sourcepub fn edit_inline_text<'a>(
&'a self,
inline_message_id: Ref<'a>,
text: impl Into<Text<'a>>,
) -> EditInlineText<'a>
pub fn edit_inline_text<'a>( &'a self, inline_message_id: Ref<'a>, text: impl Into<Text<'a>>, ) -> EditInlineText<'a>
Edits the text of a message sent via the inline mode.
Sourcepub fn edit_message_caption<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
caption: impl Into<Text<'a>>,
) -> EditMessageCaption<'a>
pub fn edit_message_caption<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, caption: impl Into<Text<'a>>, ) -> EditMessageCaption<'a>
Edits the caption of a media message sent by the bot itself.
Sourcepub fn edit_message_location<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
position: (f64, f64),
) -> EditMessageLocation<'a>
pub fn edit_message_location<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, position: (f64, f64), ) -> EditMessageLocation<'a>
Edits a live location sent by the bot itself.
Sourcepub fn edit_message_media<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
media: impl Into<EditableMedia<'a>>,
) -> EditMessageMedia<'a>
pub fn edit_message_media<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, media: impl Into<EditableMedia<'a>>, ) -> EditMessageMedia<'a>
Edits a live location sent by the bot itself.
Sourcepub fn edit_message_reply_markup<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
reply_markup: Keyboard<'a>,
) -> EditMessageReplyMarkup<'a>
pub fn edit_message_reply_markup<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, reply_markup: Keyboard<'a>, ) -> EditMessageReplyMarkup<'a>
Edits the inline keyboard of a message sent by the bot itself.
Sourcepub fn edit_message_text<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
text: impl Into<Text<'a>>,
) -> EditMessageText<'a>
pub fn edit_message_text<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, text: impl Into<Text<'a>>, ) -> EditMessageText<'a>
Edits the text of a message sent by the bot itself.
Sourcepub fn export_chat_invite_link<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> ExportChatInviteLink<'a>
pub fn export_chat_invite_link<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> ExportChatInviteLink<'a>
Exports a chat’s invite link.
Sourcepub fn forward_message<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
from_chat_id: impl ImplicitChatId<'a>,
message_id: Id,
) -> ForwardMessage<'a>
pub fn forward_message<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, from_chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> ForwardMessage<'a>
Forwards a message.
Sourcepub fn get_chat<'a>(&'a self, chat_id: impl ImplicitChatId<'a>) -> GetChat<'a>
pub fn get_chat<'a>(&'a self, chat_id: impl ImplicitChatId<'a>) -> GetChat<'a>
Gets information about a chat.
Sourcepub fn get_file<'a>(&'a self, file_id: &'a impl AsFileId) -> GetFile<'a>
pub fn get_file<'a>(&'a self, file_id: &'a impl AsFileId) -> GetFile<'a>
Gets information about a file.
Sourcepub fn get_inline_game_high_scores<'a>(
&'a self,
inline_message_id: Ref<'a>,
user_id: Id,
) -> GetInlineGameHighScores<'a>
pub fn get_inline_game_high_scores<'a>( &'a self, inline_message_id: Ref<'a>, user_id: Id, ) -> GetInlineGameHighScores<'a>
Gets an excerpt from the high score table of a game sent via the inline mode.
Sourcepub fn get_chat_administrators<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> GetChatAdministrators<'a>
pub fn get_chat_administrators<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> GetChatAdministrators<'a>
Gets information about a chat’s admins.
Sourcepub fn get_chat_member<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
) -> GetChatMember<'a>
pub fn get_chat_member<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, ) -> GetChatMember<'a>
Gets information about a chat’s member.
Sourcepub fn get_chat_members_count<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> GetChatMembersCount<'a>
pub fn get_chat_members_count<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> GetChatMembersCount<'a>
Gets a chat’s member count.
Sourcepub fn get_message_game_high_scores<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
user_id: Id,
) -> GetMessageGameHighScores<'a>
pub fn get_message_game_high_scores<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, user_id: Id, ) -> GetMessageGameHighScores<'a>
Gets an excerpt from the high score table of a game sent by the bot itself.
Sourcepub fn get_my_commands(&self) -> GetMyCommands<'_>
pub fn get_my_commands(&self) -> GetMyCommands<'_>
Gets the list of the bot’s commands.
Sourcepub fn get_sticker_set<'a>(&'a self, name: &'a str) -> GetStickerSet<'a>
pub fn get_sticker_set<'a>(&'a self, name: &'a str) -> GetStickerSet<'a>
Gets a sticker set by its name.
Sourcepub fn get_user_profile_photos(&self, user_id: Id) -> GetUserProfilePhotos<'_>
pub fn get_user_profile_photos(&self, user_id: Id) -> GetUserProfilePhotos<'_>
Gets a user’s profile photos.
Sourcepub fn get_webhook_info(&self) -> GetWebhookInfo<'_>
pub fn get_webhook_info(&self) -> GetWebhookInfo<'_>
Gets information about the bot’s webhook.
Sourcepub fn kick_chat_member<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
) -> KickChatMember<'a>
pub fn kick_chat_member<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, ) -> KickChatMember<'a>
Kicks a member out of a chat.
Sourcepub fn leave_chat<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> LeaveChat<'a>
pub fn leave_chat<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> LeaveChat<'a>
Leaves a chat.
Sourcepub fn pin_chat_message<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
) -> PinChatMessage<'a>
pub fn pin_chat_message<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> PinChatMessage<'a>
Pins a message in a chat.
Sourcepub fn promote_chat_member<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
) -> PromoteChatMember<'a>
pub fn promote_chat_member<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, ) -> PromoteChatMember<'a>
Promotes a chat member to an admin.
Sourcepub fn restrict_chat_member<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
permissions: Permissions,
) -> RestrictChatMember<'a>
pub fn restrict_chat_member<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, permissions: Permissions, ) -> RestrictChatMember<'a>
Restricts a chat member.
Sourcepub fn send_animation<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
animation: Animation<'a>,
) -> SendAnimation<'a>
pub fn send_animation<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, animation: Animation<'a>, ) -> SendAnimation<'a>
Sends an animation.
Sourcepub fn send_audio<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
audio: Audio<'a>,
) -> SendAudio<'a>
pub fn send_audio<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, audio: Audio<'a>, ) -> SendAudio<'a>
Sends an audio.
Sourcepub fn send_chat_action<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
action: Action,
) -> SendChatAction<'a>
pub fn send_chat_action<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, action: Action, ) -> SendChatAction<'a>
Sends a chat action.
Sourcepub fn send_contact<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
phone_number: &'a str,
first_name: &'a str,
) -> SendContact<'a>
pub fn send_contact<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a>
Sends a contact.
Sourcepub fn send_game<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
game_short_name: &'a str,
) -> SendGame<'a>
pub fn send_game<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, game_short_name: &'a str, ) -> SendGame<'a>
Sends a game.
Sourcepub fn send_dice<'a>(&'a self, chat_id: impl ImplicitChatId<'a>) -> SendDice<'a>
pub fn send_dice<'a>(&'a self, chat_id: impl ImplicitChatId<'a>) -> SendDice<'a>
Sends a dice.
Sourcepub fn send_document<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
document: Document<'a>,
) -> SendDocument<'a>
pub fn send_document<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, document: Document<'a>, ) -> SendDocument<'a>
Sends a document.
Sourcepub fn send_invoice<'a>(
&'a self,
chat_id: impl Into<Id>,
title: &'a str,
description: &'a str,
payload: &'a str,
provider_token: &'a str,
start_parameter: &'a str,
currency: &'a str,
prices: &'a [LabeledPrice<'a>],
) -> SendInvoice<'a>
pub fn send_invoice<'a>( &'a self, chat_id: impl Into<Id>, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a>
Sends an invoice.
Sourcepub fn send_location<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
position: (f64, f64),
) -> SendLocation<'a>
pub fn send_location<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, position: (f64, f64), ) -> SendLocation<'a>
Sends a location.
Sourcepub fn send_media_group<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
media: &'a [GroupMedia<'a>],
) -> SendMediaGroup<'a>
pub fn send_media_group<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a>
Sends an album.
Sourcepub fn send_message<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
text: impl Into<Text<'a>>,
) -> SendMessage<'a>
pub fn send_message<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, text: impl Into<Text<'a>>, ) -> SendMessage<'a>
Sends a text message.
Sourcepub fn send_photo<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
photo: Photo<'a>,
) -> SendPhoto<'a>
pub fn send_photo<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, photo: Photo<'a>, ) -> SendPhoto<'a>
Sends a photo.
Sourcepub fn send_poll<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
poll: &'a Any<'a>,
) -> SendPoll<'a>
pub fn send_poll<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, poll: &'a Any<'a>, ) -> SendPoll<'a>
Sends a poll.
Sourcepub fn send_sticker<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
sticker: Sticker<'a>,
) -> SendSticker<'a>
pub fn send_sticker<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, sticker: Sticker<'a>, ) -> SendSticker<'a>
Sends a sticker.
Sourcepub fn send_venue<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
position: (f64, f64),
title: &'a str,
address: &'a str,
) -> SendVenue<'a>
pub fn send_venue<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, position: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a>
Sends a venue.
Sourcepub fn send_video_note<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
video_note: VideoNote<'a>,
) -> SendVideoNote<'a>
pub fn send_video_note<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, video_note: VideoNote<'a>, ) -> SendVideoNote<'a>
Sends a video note.
Sourcepub fn send_video<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
video: Video<'a>,
) -> SendVideo<'a>
pub fn send_video<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, video: Video<'a>, ) -> SendVideo<'a>
Sends a video.
Sourcepub fn send_voice<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
voice: Voice<'a>,
) -> SendVoice<'a>
pub fn send_voice<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, voice: Voice<'a>, ) -> SendVoice<'a>
Sends a voice.
Sourcepub fn set_chat_administrator_custom_title<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
custom_title: &'a str,
) -> SetChatAdministratorCustomTitle<'a>
pub fn set_chat_administrator_custom_title<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, custom_title: &'a str, ) -> SetChatAdministratorCustomTitle<'a>
Sets a custom title for an admin in a chat.
Sourcepub fn set_chat_description<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
description: &'a str,
) -> SetChatDescription<'a>
pub fn set_chat_description<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, description: &'a str, ) -> SetChatDescription<'a>
Sets a chat’s description.
Sourcepub fn set_chat_permissions<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
permissions: Permissions,
) -> SetChatPermissions<'a>
pub fn set_chat_permissions<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, permissions: Permissions, ) -> SetChatPermissions<'a>
Sets a group’s global permissions.
Sourcepub fn set_chat_photo<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
photo: ChatPhoto<'a>,
) -> SetChatPhoto<'a>
pub fn set_chat_photo<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, photo: ChatPhoto<'a>, ) -> SetChatPhoto<'a>
Sets a chat’s photo.
Sourcepub fn set_chat_sticker_set<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
sticker_set_name: &'a str,
) -> SetChatStickerSet<'a>
pub fn set_chat_sticker_set<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, sticker_set_name: &'a str, ) -> SetChatStickerSet<'a>
Sets a group’s sticker set.
Sourcepub fn set_chat_title<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
title: &'a str,
) -> SetChatTitle<'a>
pub fn set_chat_title<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, title: &'a str, ) -> SetChatTitle<'a>
Sets a group’s title.
Sourcepub fn set_inline_game_score<'a>(
&'a self,
inline_message_id: Ref<'a>,
user_id: Id,
score: u32,
) -> SetInlineGameScore<'a>
pub fn set_inline_game_score<'a>( &'a self, inline_message_id: Ref<'a>, user_id: Id, score: u32, ) -> SetInlineGameScore<'a>
Sets a user’s new high score in a game sent via the inline mode.
Sourcepub fn set_message_game_score<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
user_id: Id,
score: u32,
) -> SetMessageGameScore<'a>
pub fn set_message_game_score<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, user_id: Id, score: u32, ) -> SetMessageGameScore<'a>
Sets a user’s new high score in a game sent by the bot itself.
Sourcepub fn set_my_commands<'a>(
&'a self,
commands: &'a [BotCommand<'a>],
) -> SetMyCommands<'a>
pub fn set_my_commands<'a>( &'a self, commands: &'a [BotCommand<'a>], ) -> SetMyCommands<'a>
Sets the list of the bot’s commands.
Sourcepub fn set_passport_data_errors<'a>(
&'a self,
user_id: Id,
errors: &'a [Error<'a>],
) -> SetPassportDataErrors<'a>
pub fn set_passport_data_errors<'a>( &'a self, user_id: Id, errors: &'a [Error<'a>], ) -> SetPassportDataErrors<'a>
Reports passport errors to the user.
Sourcepub fn set_sticker_position_in_set<'a>(
&'a self,
sticker: &'a str,
position: u32,
) -> SetStickerPositionInSet<'a>
pub fn set_sticker_position_in_set<'a>( &'a self, sticker: &'a str, position: u32, ) -> SetStickerPositionInSet<'a>
Changes a sticker’s position in a sticker set.
Sourcepub fn set_sticker_set_thumb<'a>(
&'a self,
user_id: Id,
name: &'a str,
thumb: Option<&'a StickerSetThumb<'a>>,
) -> SetStickerSetThumb<'a>
pub fn set_sticker_set_thumb<'a>( &'a self, user_id: Id, name: &'a str, thumb: Option<&'a StickerSetThumb<'a>>, ) -> SetStickerSetThumb<'a>
Sets the thumb of a sticker set.
Sourcepub fn stop_inline_location<'a>(
&'a self,
inline_message_id: Ref<'a>,
) -> StopInlineLocation<'a>
pub fn stop_inline_location<'a>( &'a self, inline_message_id: Ref<'a>, ) -> StopInlineLocation<'a>
Stops a live location sent via the inline mode.
Sourcepub fn stop_message_location<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
) -> StopMessageLocation<'a>
pub fn stop_message_location<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> StopMessageLocation<'a>
Stops a live location sent by the bot itself.
Sourcepub fn stop_poll<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
message_id: Id,
) -> StopPoll<'a>
pub fn stop_poll<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> StopPoll<'a>
Stops a poll.
Sourcepub fn unban_chat_member<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
user_id: Id,
) -> UnbanChatMember<'a>
pub fn unban_chat_member<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, user_id: Id, ) -> UnbanChatMember<'a>
Lifts all restrictions from a group’s member.
Sourcepub fn unpin_chat_message<'a>(
&'a self,
chat_id: impl ImplicitChatId<'a>,
) -> UnpinChatMessage<'a>
pub fn unpin_chat_message<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> UnpinChatMessage<'a>
Unpins a chat message.
Sourcepub fn upload_sticker_file<'a>(
&'a self,
user_id: Id,
png_sticker: &'a [u8],
) -> UploadStickerFile<'a>
pub fn upload_sticker_file<'a>( &'a self, user_id: Id, png_sticker: &'a [u8], ) -> UploadStickerFile<'a>
Uploads a sticker file.