Skip to main content

Bot

Struct Bot 

Source
pub struct Bot { /* private fields */ }
Expand description

A requests sender.

This is the main type of the library, it allows to send requests to the Telegram Bot API and download files.

§TBA methods

All TBA methods are located in the Requester impl for Bot. This allows for opt-in behaviours using requester adaptors.

use teloxide_core_ng::prelude::*;

let bot = Bot::new("TOKEN");
dbg!(bot.get_me().await?);

§File download

In the similar way as with TBA methods, file downloading methods are located in a trait — Download<'_>. See its documentation for more.

§Clone cost

Bot::clone is relatively cheap, so if you need to share Bot, it’s recommended to clone it, instead of wrapping it in Arc<_>.

Implementations§

Source§

impl Bot

Constructors

Source

pub fn new<S>(token: S) -> Bot
where S: Into<String>,

Creates a new Bot with the specified token and the default http-client.

§Panics

If it cannot create reqwest::Client.

Source

pub fn with_client<S>(token: S, client: Client) -> Bot
where S: Into<String>,

Creates a new Bot with the specified token and your reqwest::Client.

§Caution

Your custom client might not be configured correctly to be able to work in long time durations, see issue 223.

Source

pub fn from_env() -> Bot

Creates a new Bot with the TELOXIDE_TOKEN & TELOXIDE_API_URL & TELOXIDE_PROXY environmental variables (the bot’s token & the bot’s API URL & the proxy) and the default reqwest::Client.

If TELOXIDE_API_URL doesn’t exist, returns to the default TBA URL.

This function passes the value of TELOXIDE_PROXY into reqwest::Proxy::all, if it exists, otherwise returns the default client.

§Panics
  • If cannot get the TELOXIDE_TOKEN environmental variable.
  • If TELOXIDE_API_URL exists, but isn’t a correct URL.
  • If it cannot create reqwest::Client.
Examples found in repository?
examples/command.rs (line 8)
4async fn main() {
5    pretty_env_logger::init();
6    log::info!("Starting command bot...");
7
8    let bot = Bot::from_env();
9
10    Command::repl(bot, answer).await;
11}
More examples
Hide additional examples
examples/admin.rs (line 59)
55async fn main() {
56    pretty_env_logger::init();
57    log::info!("Starting admin bot...");
58
59    let bot = teloxide_ng::Bot::from_env();
60
61    Command::repl(bot, action).await;
62}
examples/throw_dice.rs (line 10)
6async fn main() {
7    pretty_env_logger::init();
8    log::info!("Starting throw dice bot...");
9
10    let bot = Bot::from_env();
11
12    teloxide_ng::repl(bot, |bot: Bot, msg: Message| async move {
13        bot.send_dice(msg.chat.id).await?;
14        Ok(())
15    })
16    .await;
17}
examples/purchase.rs (line 52)
48async fn main() {
49    pretty_env_logger::init();
50    log::info!("Starting purchase bot...");
51
52    let bot = Bot::from_env();
53
54    Dispatcher::builder(bot, schema())
55        .dependencies(dptree::deps![InMemStorage::<State>::new()])
56        .enable_ctrlc_handler()
57        .build()
58        .dispatch()
59        .await;
60}
examples/buttons.rs (line 28)
24async fn main() -> Result<(), Box<dyn Error>> {
25    pretty_env_logger::init();
26    log::info!("Starting buttons bot...");
27
28    let bot = Bot::from_env();
29
30    let handler = dptree::entry()
31        .branch(Update::filter_message().endpoint(message_handler))
32        .branch(Update::filter_callback_query().endpoint(callback_handler))
33        .branch(Update::filter_inline_query().endpoint(inline_query_handler));
34
35    Dispatcher::builder(bot, handler).enable_ctrlc_handler().build().dispatch().await;
36    Ok(())
37}
examples/ngrok_ping_pong.rs (line 11)
7async fn main() {
8    pretty_env_logger::init();
9    log::info!("Starting ngrok ping-pong bot...");
10
11    let bot = Bot::from_env();
12
13    let addr = ([127, 0, 0, 1], 8443).into();
14    let url = "Your HTTPS ngrok URL here. Get it by `ngrok http 8443`".parse().unwrap();
15    let listener = webhooks::axum(bot.clone(), webhooks::Options::new(addr, url))
16        .await
17        .expect("Couldn't setup webhook");
18
19    teloxide_ng::repl_with_listener(
20        bot,
21        |bot: Bot, msg: Message| async move {
22            bot.send_message(msg.chat.id, "pong").await?;
23            Ok(())
24        },
25        listener,
26    )
27    .await;
28}
Source

pub fn from_env_with_client(client: Client) -> Bot

Creates a new Bot with the TELOXIDE_TOKEN environmental variable (the bot’s token), TELOXIDE_API_URL environmental variable (the bot’s API URL) and your reqwest::Client.

If TELOXIDE_API_URL doesn’t exist, returns to the default TBA URL.

§Panics
  • If cannot get the TELOXIDE_TOKEN environmental variable.
  • If TELOXIDE_API_URL exists, but isn’t a correct URL.
§Caution

Your custom client might not be configured correctly to be able to work in long time durations, see issue 223.

Source

pub fn set_api_url(self, url: Url) -> Bot

Sets a custom API URL.

For example, you can run your own TBA server and set its URL using this method.

§Examples
use teloxide_core_ng::{
    Bot,
    requests::{Request, Requester},
};

let url = reqwest::Url::parse("https://localhost/tbas").unwrap();
let bot = Bot::new("TOKEN").set_api_url(url);
// From now all methods will use "https://localhost/tbas" as an API URL.
bot.get_me().await
§Multi-instance behaviour

This method only sets the URL for one bot instace, older clones are unaffected.

use teloxide_core_ng::Bot;

let bot = Bot::new("TOKEN");
let bot2 = bot.clone();
let bot = bot.set_api_url(reqwest::Url::parse("https://example.com/").unwrap());

assert_eq!(bot.api_url().as_str(), "https://example.com/");
assert_eq!(bot.clone().api_url().as_str(), "https://example.com/");
assert_ne!(bot2.api_url().as_str(), "https://example.com/");
Source§

impl Bot

Getters

Source

pub fn token(&self) -> &str

Returns currently used token.

Source

pub fn client(&self) -> &Client

Returns currently used http-client.

Source

pub fn api_url(&self) -> Url

Returns currently used token API URL.

Trait Implementations§

Source§

impl Clone for Bot

Source§

fn clone(&self) -> Bot

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Bot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Download for Bot

Source§

type Err<'dst> = DownloadError

An error returned from download_file.
Source§

type Fut<'dst> = Pin<Box<dyn Future<Output = Result<(), <Bot as Download>::Err<'dst>>> + Send + 'dst>>

A future returned from download_file.
Source§

type StreamErr = Error

An error returned from download_file_stream.
Source§

type Stream = Pin<Box<dyn Stream<Item = Result<Bytes, <Bot as Download>::StreamErr>> + Send>>

A stream returned from download_file_stream.
Source§

fn download_file<'dst>( &self, path: &str, destination: &'dst mut (dyn AsyncWrite + Send + Unpin), ) -> <Bot as Download>::Fut<'dst>

Download a file from Telegram into destination. Read more
Source§

fn download_file_stream(&self, path: &str) -> <Bot as Download>::Stream

Download a file from Telegram as Stream. Read more
Source§

impl Requester for Bot

Source§

type Err = RequestError

Error type returned by all requests.
Source§

type GetUpdates = JsonRequest<GetUpdates>

Source§

type SetWebhook = MultipartRequest<SetWebhook>

Source§

type DeleteWebhook = JsonRequest<DeleteWebhook>

Source§

type GetWebhookInfo = JsonRequest<GetWebhookInfo>

Source§

type GetMe = JsonRequest<GetMe>

Source§

type SendMessage = JsonRequest<SendMessage>

Source§

type SendMessageDraft = JsonRequest<SendMessageDraft>

Source§

type ForwardMessage = JsonRequest<ForwardMessage>

Source§

type ForwardMessages = JsonRequest<ForwardMessages>

Source§

type SendPhoto = MultipartRequest<SendPhoto>

Source§

type SendAudio = MultipartRequest<SendAudio>

Source§

type SendDocument = MultipartRequest<SendDocument>

Source§

type SendVideo = MultipartRequest<SendVideo>

Source§

type SendAnimation = MultipartRequest<SendAnimation>

Source§

type SendVoice = MultipartRequest<SendVoice>

Source§

type SendVideoNote = MultipartRequest<SendVideoNote>

Source§

type SendPaidMedia = MultipartRequest<SendPaidMedia>

Source§

type SendMediaGroup = MultipartRequest<SendMediaGroup>

Source§

type SendLocation = JsonRequest<SendLocation>

Source§

type EditMessageLiveLocation = JsonRequest<EditMessageLiveLocation>

Source§

type EditMessageLiveLocationInline = JsonRequest<EditMessageLiveLocationInline>

Source§

type StopMessageLiveLocation = JsonRequest<StopMessageLiveLocation>

Source§

type StopMessageLiveLocationInline = JsonRequest<StopMessageLiveLocationInline>

Source§

type EditMessageChecklist = JsonRequest<EditMessageChecklist>

Source§

type SendVenue = JsonRequest<SendVenue>

Source§

type SendContact = JsonRequest<SendContact>

Source§

type SendPoll = JsonRequest<SendPoll>

Source§

type SendChecklist = JsonRequest<SendChecklist>

Source§

type SendDice = JsonRequest<SendDice>

Source§

type SendChatAction = JsonRequest<SendChatAction>

Source§

type SetMessageReaction = JsonRequest<SetMessageReaction>

Source§

type GetUserProfilePhotos = JsonRequest<GetUserProfilePhotos>

Source§

type SetUserEmojiStatus = JsonRequest<SetUserEmojiStatus>

Source§

type GetFile = JsonRequest<GetFile>

Source§

type KickChatMember = JsonRequest<KickChatMember>

Source§

type BanChatMember = JsonRequest<BanChatMember>

Source§

type UnbanChatMember = JsonRequest<UnbanChatMember>

Source§

type RestrictChatMember = JsonRequest<RestrictChatMember>

Source§

type PromoteChatMember = JsonRequest<PromoteChatMember>

Source§

type SetChatAdministratorCustomTitle = JsonRequest<SetChatAdministratorCustomTitle>

Source§

type BanChatSenderChat = JsonRequest<BanChatSenderChat>

Source§

type UnbanChatSenderChat = JsonRequest<UnbanChatSenderChat>

Source§

type SetChatPermissions = JsonRequest<SetChatPermissions>

Source§

type ApproveChatJoinRequest = JsonRequest<ApproveChatJoinRequest>

Source§

type DeclineChatJoinRequest = JsonRequest<DeclineChatJoinRequest>

Source§

type SetChatPhoto = MultipartRequest<SetChatPhoto>

Source§

type DeleteChatPhoto = JsonRequest<DeleteChatPhoto>

Source§

type SetChatTitle = JsonRequest<SetChatTitle>

Source§

type SetChatDescription = JsonRequest<SetChatDescription>

Source§

type PinChatMessage = JsonRequest<PinChatMessage>

Source§

type UnpinChatMessage = JsonRequest<UnpinChatMessage>

Source§

type LeaveChat = JsonRequest<LeaveChat>

Source§

type GetChat = JsonRequest<GetChat>

Source§

type GetChatAdministrators = JsonRequest<GetChatAdministrators>

Source§

type GetChatMembersCount = JsonRequest<GetChatMembersCount>

Source§

type GetChatMemberCount = JsonRequest<GetChatMemberCount>

Source§

type GetChatMember = JsonRequest<GetChatMember>

Source§

type SetChatStickerSet = JsonRequest<SetChatStickerSet>

Source§

type DeleteChatStickerSet = JsonRequest<DeleteChatStickerSet>

Source§

type GetForumTopicIconStickers = JsonRequest<GetForumTopicIconStickers>

Source§

type CreateForumTopic = JsonRequest<CreateForumTopic>

Source§

type EditForumTopic = JsonRequest<EditForumTopic>

Source§

type CloseForumTopic = JsonRequest<CloseForumTopic>

Source§

type ReopenForumTopic = JsonRequest<ReopenForumTopic>

Source§

type DeleteForumTopic = JsonRequest<DeleteForumTopic>

Source§

type UnpinAllForumTopicMessages = JsonRequest<UnpinAllForumTopicMessages>

Source§

type EditGeneralForumTopic = JsonRequest<EditGeneralForumTopic>

Source§

type CloseGeneralForumTopic = JsonRequest<CloseGeneralForumTopic>

Source§

type ReopenGeneralForumTopic = JsonRequest<ReopenGeneralForumTopic>

Source§

type HideGeneralForumTopic = JsonRequest<HideGeneralForumTopic>

Source§

type UnhideGeneralForumTopic = JsonRequest<UnhideGeneralForumTopic>

Source§

type UnpinAllGeneralForumTopicMessages = JsonRequest<UnpinAllGeneralForumTopicMessages>

Source§

type AnswerCallbackQuery = JsonRequest<AnswerCallbackQuery>

Source§

type GetUserChatBoosts = JsonRequest<GetUserChatBoosts>

Source§

type SetMyCommands = JsonRequest<SetMyCommands>

Source§

type GetBusinessConnection = JsonRequest<GetBusinessConnection>

Source§

type GetMyCommands = JsonRequest<GetMyCommands>

Source§

type SetMyName = JsonRequest<SetMyName>

Source§

type GetMyName = JsonRequest<GetMyName>

Source§

type SetMyDescription = JsonRequest<SetMyDescription>

Source§

type GetMyDescription = JsonRequest<GetMyDescription>

Source§

type SetMyShortDescription = JsonRequest<SetMyShortDescription>

Source§

type GetMyShortDescription = JsonRequest<GetMyShortDescription>

Source§

type SetChatMenuButton = JsonRequest<SetChatMenuButton>

Source§

type GetChatMenuButton = JsonRequest<GetChatMenuButton>

Source§

type SetMyDefaultAdministratorRights = JsonRequest<SetMyDefaultAdministratorRights>

Source§

type GetMyDefaultAdministratorRights = JsonRequest<GetMyDefaultAdministratorRights>

Source§

type DeleteMyCommands = JsonRequest<DeleteMyCommands>

Source§

type AnswerInlineQuery = JsonRequest<AnswerInlineQuery>

Source§

type AnswerWebAppQuery = JsonRequest<AnswerWebAppQuery>

Source§

type SavePreparedInlineMessage = JsonRequest<SavePreparedInlineMessage>

Source§

type EditMessageText = JsonRequest<EditMessageText>

Source§

type EditMessageTextInline = JsonRequest<EditMessageTextInline>

Source§

type EditMessageCaption = JsonRequest<EditMessageCaption>

Source§

type EditMessageCaptionInline = JsonRequest<EditMessageCaptionInline>

Source§

type EditMessageMedia = MultipartRequest<EditMessageMedia>

Source§

type EditMessageMediaInline = MultipartRequest<EditMessageMediaInline>

Source§

type EditMessageReplyMarkup = JsonRequest<EditMessageReplyMarkup>

Source§

type EditMessageReplyMarkupInline = JsonRequest<EditMessageReplyMarkupInline>

Source§

type StopPoll = JsonRequest<StopPoll>

Source§

type ApproveSuggestedPost = JsonRequest<ApproveSuggestedPost>

Source§

type DeclineSuggestedPost = JsonRequest<DeclineSuggestedPost>

Source§

type DeleteMessage = JsonRequest<DeleteMessage>

Source§

type DeleteMessages = JsonRequest<DeleteMessages>

Source§

type SendSticker = MultipartRequest<SendSticker>

Source§

type GetStickerSet = JsonRequest<GetStickerSet>

Source§

type GetCustomEmojiStickers = JsonRequest<GetCustomEmojiStickers>

Source§

type UploadStickerFile = MultipartRequest<UploadStickerFile>

Source§

type CreateNewStickerSet = MultipartRequest<CreateNewStickerSet>

Source§

type AddStickerToSet = MultipartRequest<AddStickerToSet>

Source§

type SetStickerPositionInSet = JsonRequest<SetStickerPositionInSet>

Source§

type DeleteStickerFromSet = JsonRequest<DeleteStickerFromSet>

Source§

type ReplaceStickerInSet = JsonRequest<ReplaceStickerInSet>

Source§

type SetStickerSetThumbnail = MultipartRequest<SetStickerSetThumbnail>

Source§

type SetCustomEmojiStickerSetThumbnail = JsonRequest<SetCustomEmojiStickerSetThumbnail>

Source§

type SetStickerSetTitle = JsonRequest<SetStickerSetTitle>

Source§

type DeleteStickerSet = JsonRequest<DeleteStickerSet>

Source§

type SetStickerEmojiList = JsonRequest<SetStickerEmojiList>

Source§

type SetStickerKeywords = JsonRequest<SetStickerKeywords>

Source§

type SetStickerMaskPosition = JsonRequest<SetStickerMaskPosition>

Source§

type GetAvailableGifts = JsonRequest<GetAvailableGifts>

Source§

type SendGift = JsonRequest<SendGift>

Source§

type SendGiftChat = JsonRequest<SendGiftChat>

Source§

type GiftPremiumSubscription = JsonRequest<GiftPremiumSubscription>

Source§

type VerifyUser = JsonRequest<VerifyUser>

Source§

type VerifyChat = JsonRequest<VerifyChat>

Source§

type RemoveUserVerification = JsonRequest<RemoveUserVerification>

Source§

type RemoveChatVerification = JsonRequest<RemoveChatVerification>

Source§

type ReadBusinessMessage = JsonRequest<ReadBusinessMessage>

Source§

type DeleteBusinessMessages = JsonRequest<DeleteBusinessMessages>

Source§

type SetBusinessAccountName = JsonRequest<SetBusinessAccountName>

Source§

type SetBusinessAccountUsername = JsonRequest<SetBusinessAccountUsername>

Source§

type SetBusinessAccountBio = JsonRequest<SetBusinessAccountBio>

Source§

type SetBusinessAccountProfilePhoto = JsonRequest<SetBusinessAccountProfilePhoto>

Source§

type RemoveBusinessAccountProfilePhoto = JsonRequest<RemoveBusinessAccountProfilePhoto>

Source§

type SetBusinessAccountGiftSettings = JsonRequest<SetBusinessAccountGiftSettings>

Source§

type GetBusinessAccountStarBalance = JsonRequest<GetBusinessAccountStarBalance>

Source§

type TransferBusinessAccountStars = JsonRequest<TransferBusinessAccountStars>

Source§

type GetBusinessAccountGifts = JsonRequest<GetBusinessAccountGifts>

Source§

type GetUserGifts = JsonRequest<GetUserGifts>

Source§

type GetChatGifts = JsonRequest<GetChatGifts>

Source§

type ConvertGiftToStars = JsonRequest<ConvertGiftToStars>

Source§

type UpgradeGift = JsonRequest<UpgradeGift>

Source§

type TransferGift = JsonRequest<TransferGift>

Source§

type PostStory = JsonRequest<PostStory>

Source§

type RepostStory = JsonRequest<RepostStory>

Source§

type EditStory = JsonRequest<EditStory>

Source§

type DeleteStory = JsonRequest<DeleteStory>

Source§

type SendInvoice = JsonRequest<SendInvoice>

Source§

type AnswerShippingQuery = JsonRequest<AnswerShippingQuery>

Source§

type AnswerPreCheckoutQuery = JsonRequest<AnswerPreCheckoutQuery>

Source§

type GetMyStarBalance = JsonRequest<GetMyStarBalance>

Source§

type GetStarTransactions = JsonRequest<GetStarTransactions>

Source§

type RefundStarPayment = JsonRequest<RefundStarPayment>

Source§

type EditUserStarSubscription = JsonRequest<EditUserStarSubscription>

Source§

type SetPassportDataErrors = JsonRequest<SetPassportDataErrors>

Source§

type SendGame = JsonRequest<SendGame>

Source§

type SetGameScore = JsonRequest<SetGameScore>

Source§

type SetGameScoreInline = JsonRequest<SetGameScoreInline>

Source§

type GetGameHighScores = JsonRequest<GetGameHighScores>

Source§

type LogOut = JsonRequest<LogOut>

Source§

type Close = JsonRequest<Close>

Source§

type CopyMessage = JsonRequest<CopyMessage>

Source§

type CopyMessages = JsonRequest<CopyMessages>

Source§

type UnpinAllChatMessages = JsonRequest<UnpinAllChatMessages>

Source§

fn get_updates(&self) -> <Bot as Requester>::GetUpdates

For Telegram documentation see GetUpdates.
Source§

fn set_webhook(&self, url: Url) -> <Bot as Requester>::SetWebhook

For Telegram documentation see SetWebhook.
Source§

fn delete_webhook(&self) -> <Bot as Requester>::DeleteWebhook

For Telegram documentation see DeleteWebhook.
Source§

fn get_webhook_info(&self) -> <Bot as Requester>::GetWebhookInfo

For Telegram documentation see GetWebhookInfo.
Source§

fn get_me(&self) -> <Bot as Requester>::GetMe

For Telegram documentation see GetMe.
Source§

fn send_message<C, T>( &self, chat_id: C, text: T, ) -> <Bot as Requester>::SendMessage
where C: Into<Recipient>, T: Into<String>,

For Telegram documentation see SendMessage.
Source§

fn send_message_draft<C, T>( &self, chat_id: C, draft_id: u32, text: T, ) -> <Bot as Requester>::SendMessageDraft
where C: Into<ChatId>, T: Into<String>,

For Telegram documentation see SendMessageDraft.
Source§

fn forward_message<C, F>( &self, chat_id: C, from_chat_id: F, message_id: MessageId, ) -> <Bot as Requester>::ForwardMessage
where C: Into<Recipient>, F: Into<Recipient>,

For Telegram documentation see ForwardMessage.
Source§

fn forward_messages<C, F, M>( &self, chat_id: C, from_chat_id: F, message_ids: M, ) -> <Bot as Requester>::ForwardMessages
where C: Into<Recipient>, F: Into<Recipient>, M: IntoIterator<Item = MessageId>,

For Telegram documentation see ForwardMessages.
Source§

fn send_photo<C>( &self, chat_id: C, photo: InputFile, ) -> <Bot as Requester>::SendPhoto
where C: Into<Recipient>,

For Telegram documentation see SendPhoto.
Source§

fn send_audio<C>( &self, chat_id: C, audio: InputFile, ) -> <Bot as Requester>::SendAudio
where C: Into<Recipient>,

For Telegram documentation see SendAudio.
Source§

fn send_document<C>( &self, chat_id: C, document: InputFile, ) -> <Bot as Requester>::SendDocument
where C: Into<Recipient>,

For Telegram documentation see SendDocument.
Source§

fn send_video<C>( &self, chat_id: C, video: InputFile, ) -> <Bot as Requester>::SendVideo
where C: Into<Recipient>,

For Telegram documentation see SendVideo.
Source§

fn send_animation<C>( &self, chat_id: C, animation: InputFile, ) -> <Bot as Requester>::SendAnimation
where C: Into<Recipient>,

For Telegram documentation see SendAnimation.
Source§

fn send_voice<C>( &self, chat_id: C, voice: InputFile, ) -> <Bot as Requester>::SendVoice
where C: Into<Recipient>,

For Telegram documentation see SendVoice.
Source§

fn send_video_note<C>( &self, chat_id: C, video_note: InputFile, ) -> <Bot as Requester>::SendVideoNote
where C: Into<Recipient>,

For Telegram documentation see SendVideoNote.
Source§

fn send_paid_media<C, M>( &self, chat_id: C, star_count: u32, media: M, ) -> <Bot as Requester>::SendPaidMedia
where C: Into<Recipient>, M: IntoIterator<Item = InputPaidMedia>,

For Telegram documentation see SendPaidMedia.
Source§

fn send_media_group<C, M>( &self, chat_id: C, media: M, ) -> <Bot as Requester>::SendMediaGroup
where C: Into<Recipient>, M: IntoIterator<Item = InputMedia>,

For Telegram documentation see SendMediaGroup.
Source§

fn send_location<C>( &self, chat_id: C, latitude: f64, longitude: f64, ) -> <Bot as Requester>::SendLocation
where C: Into<Recipient>,

For Telegram documentation see SendLocation.
Source§

fn edit_message_live_location<C>( &self, chat_id: C, message_id: MessageId, latitude: f64, longitude: f64, ) -> <Bot as Requester>::EditMessageLiveLocation
where C: Into<Recipient>,

For Telegram documentation see EditMessageLiveLocation.
Source§

fn edit_message_live_location_inline<I>( &self, inline_message_id: I, latitude: f64, longitude: f64, ) -> <Bot as Requester>::EditMessageLiveLocationInline
where I: Into<String>,

For Telegram documentation see EditMessageLiveLocationInline.
Source§

fn stop_message_live_location<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::StopMessageLiveLocation
where C: Into<Recipient>,

For Telegram documentation see StopMessageLiveLocation.
Source§

fn stop_message_live_location_inline<I>( &self, inline_message_id: I, ) -> <Bot as Requester>::StopMessageLiveLocationInline
where I: Into<String>,

For Telegram documentation see StopMessageLiveLocationInline.
Source§

fn edit_message_checklist<C>( &self, business_connection_id: BusinessConnectionId, chat_id: C, message_id: MessageId, checklist: InputChecklist, ) -> <Bot as Requester>::EditMessageChecklist
where C: Into<ChatId>,

For Telegram documentation see EditMessageChecklist.
Source§

fn send_venue<C, T, A>( &self, chat_id: C, latitude: f64, longitude: f64, title: T, address: A, ) -> <Bot as Requester>::SendVenue
where C: Into<Recipient>, T: Into<String>, A: Into<String>,

For Telegram documentation see SendVenue.
Source§

fn send_contact<C, P, F>( &self, chat_id: C, phone_number: P, first_name: F, ) -> <Bot as Requester>::SendContact
where C: Into<Recipient>, P: Into<String>, F: Into<String>,

For Telegram documentation see SendContact.
Source§

fn send_poll<C, Q, O>( &self, chat_id: C, question: Q, options: O, ) -> <Bot as Requester>::SendPoll

For Telegram documentation see SendPoll.
Source§

fn send_checklist<C>( &self, business_connection_id: BusinessConnectionId, chat_id: C, checklist: InputChecklist, ) -> <Bot as Requester>::SendChecklist
where C: Into<ChatId>,

For Telegram documentation see SendChecklist.
Source§

fn send_dice<C>(&self, chat_id: C) -> <Bot as Requester>::SendDice
where C: Into<Recipient>,

For Telegram documentation see SendDice.
Source§

fn send_chat_action<C>( &self, chat_id: C, action: ChatAction, ) -> <Bot as Requester>::SendChatAction
where C: Into<Recipient>,

For Telegram documentation see SendChatAction.
Source§

fn set_message_reaction<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::SetMessageReaction
where C: Into<Recipient>,

For Telegram documentation see SetMessageReaction.
Source§

fn get_user_profile_photos( &self, user_id: UserId, ) -> <Bot as Requester>::GetUserProfilePhotos

For Telegram documentation see GetUserProfilePhotos.
Source§

fn set_user_emoji_status( &self, user_id: UserId, ) -> <Bot as Requester>::SetUserEmojiStatus

For Telegram documentation see SetUserEmojiStatus.
Source§

fn get_file(&self, file_id: FileId) -> <Bot as Requester>::GetFile

For Telegram documentation see GetFile.
Source§

fn kick_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::KickChatMember
where C: Into<Recipient>,

For Telegram documentation see KickChatMember.
Source§

fn ban_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::BanChatMember
where C: Into<Recipient>,

For Telegram documentation see BanChatMember.
Source§

fn unban_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::UnbanChatMember
where C: Into<Recipient>,

For Telegram documentation see UnbanChatMember.
Source§

fn restrict_chat_member<C>( &self, chat_id: C, user_id: UserId, permissions: ChatPermissions, ) -> <Bot as Requester>::RestrictChatMember
where C: Into<Recipient>,

For Telegram documentation see RestrictChatMember.
Source§

fn promote_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::PromoteChatMember
where C: Into<Recipient>,

For Telegram documentation see PromoteChatMember.
Source§

fn set_chat_administrator_custom_title<Ch, Cu>( &self, chat_id: Ch, user_id: UserId, custom_title: Cu, ) -> <Bot as Requester>::SetChatAdministratorCustomTitle
where Ch: Into<Recipient>, Cu: Into<String>,

For Telegram documentation see SetChatAdministratorCustomTitle.
Source§

fn ban_chat_sender_chat<C, S>( &self, chat_id: C, sender_chat_id: S, ) -> <Bot as Requester>::BanChatSenderChat
where C: Into<Recipient>, S: Into<ChatId>,

For Telegram documentation see BanChatSenderChat.
Source§

fn unban_chat_sender_chat<C, S>( &self, chat_id: C, sender_chat_id: S, ) -> <Bot as Requester>::UnbanChatSenderChat
where C: Into<Recipient>, S: Into<ChatId>,

For Telegram documentation see UnbanChatSenderChat.
Source§

fn set_chat_permissions<C>( &self, chat_id: C, permissions: ChatPermissions, ) -> <Bot as Requester>::SetChatPermissions
where C: Into<Recipient>,

For Telegram documentation see SetChatPermissions.
For Telegram documentation see ExportChatInviteLink.
For Telegram documentation see CreateChatInviteLink.
For Telegram documentation see EditChatInviteLink.
For Telegram documentation see CreateChatSubscriptionInviteLink.
For Telegram documentation see EditChatSubscriptionInviteLink.
For Telegram documentation see RevokeChatInviteLink.
Source§

fn approve_chat_join_request<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::ApproveChatJoinRequest
where C: Into<Recipient>,

For Telegram documentation see ApproveChatJoinRequest.
Source§

fn decline_chat_join_request<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::DeclineChatJoinRequest
where C: Into<Recipient>,

For Telegram documentation see DeclineChatJoinRequest.
Source§

fn set_chat_photo<C>( &self, chat_id: C, photo: InputFile, ) -> <Bot as Requester>::SetChatPhoto
where C: Into<Recipient>,

For Telegram documentation see SetChatPhoto.
Source§

fn delete_chat_photo<C>( &self, chat_id: C, ) -> <Bot as Requester>::DeleteChatPhoto
where C: Into<Recipient>,

For Telegram documentation see DeleteChatPhoto.
Source§

fn set_chat_title<C, T>( &self, chat_id: C, title: T, ) -> <Bot as Requester>::SetChatTitle
where C: Into<Recipient>, T: Into<String>,

For Telegram documentation see SetChatTitle.
Source§

fn set_chat_description<C>( &self, chat_id: C, ) -> <Bot as Requester>::SetChatDescription
where C: Into<Recipient>,

For Telegram documentation see SetChatDescription.
Source§

fn pin_chat_message<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::PinChatMessage
where C: Into<Recipient>,

For Telegram documentation see PinChatMessage.
Source§

fn unpin_chat_message<C>( &self, chat_id: C, ) -> <Bot as Requester>::UnpinChatMessage
where C: Into<Recipient>,

For Telegram documentation see UnpinChatMessage.
Source§

fn leave_chat<C>(&self, chat_id: C) -> <Bot as Requester>::LeaveChat
where C: Into<Recipient>,

For Telegram documentation see LeaveChat.
Source§

fn get_chat<C>(&self, chat_id: C) -> <Bot as Requester>::GetChat
where C: Into<Recipient>,

For Telegram documentation see GetChat.
Source§

fn get_chat_administrators<C>( &self, chat_id: C, ) -> <Bot as Requester>::GetChatAdministrators
where C: Into<Recipient>,

For Telegram documentation see GetChatAdministrators.
Source§

fn get_chat_members_count<C>( &self, chat_id: C, ) -> <Bot as Requester>::GetChatMembersCount
where C: Into<Recipient>,

For Telegram documentation see GetChatMembersCount.
Source§

fn get_chat_member_count<C>( &self, chat_id: C, ) -> <Bot as Requester>::GetChatMemberCount
where C: Into<Recipient>,

For Telegram documentation see GetChatMemberCount.
Source§

fn get_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::GetChatMember
where C: Into<Recipient>,

For Telegram documentation see GetChatMember.
Source§

fn set_chat_sticker_set<C, S>( &self, chat_id: C, sticker_set_name: S, ) -> <Bot as Requester>::SetChatStickerSet
where C: Into<Recipient>, S: Into<String>,

For Telegram documentation see SetChatStickerSet.
Source§

fn delete_chat_sticker_set<C>( &self, chat_id: C, ) -> <Bot as Requester>::DeleteChatStickerSet
where C: Into<Recipient>,

For Telegram documentation see DeleteChatStickerSet.
Source§

fn get_forum_topic_icon_stickers( &self, ) -> <Bot as Requester>::GetForumTopicIconStickers

For Telegram documentation see GetForumTopicIconStickers.
Source§

fn create_forum_topic<C, N>( &self, chat_id: C, name: N, ) -> <Bot as Requester>::CreateForumTopic
where C: Into<Recipient>, N: Into<String>,

For Telegram documentation see CreateForumTopic.
Source§

fn edit_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> <Bot as Requester>::EditForumTopic
where C: Into<Recipient>,

For Telegram documentation see EditForumTopic.
Source§

fn close_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> <Bot as Requester>::CloseForumTopic
where C: Into<Recipient>,

For Telegram documentation see CloseForumTopic.
Source§

fn reopen_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> <Bot as Requester>::ReopenForumTopic
where C: Into<Recipient>,

For Telegram documentation see ReopenForumTopic.
Source§

fn delete_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> <Bot as Requester>::DeleteForumTopic
where C: Into<Recipient>,

For Telegram documentation see DeleteForumTopic.
Source§

fn unpin_all_forum_topic_messages<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> <Bot as Requester>::UnpinAllForumTopicMessages
where C: Into<Recipient>,

For Telegram documentation see UnpinAllForumTopicMessages.
Source§

fn edit_general_forum_topic<C, N>( &self, chat_id: C, name: N, ) -> <Bot as Requester>::EditGeneralForumTopic
where C: Into<Recipient>, N: Into<String>,

For Telegram documentation see EditGeneralForumTopic.
Source§

fn close_general_forum_topic<C>( &self, chat_id: C, ) -> <Bot as Requester>::CloseGeneralForumTopic
where C: Into<Recipient>,

For Telegram documentation see CloseGeneralForumTopic.
Source§

fn reopen_general_forum_topic<C>( &self, chat_id: C, ) -> <Bot as Requester>::ReopenGeneralForumTopic
where C: Into<Recipient>,

For Telegram documentation see ReopenGeneralForumTopic.
Source§

fn hide_general_forum_topic<C>( &self, chat_id: C, ) -> <Bot as Requester>::HideGeneralForumTopic
where C: Into<Recipient>,

For Telegram documentation see HideGeneralForumTopic.
Source§

fn unhide_general_forum_topic<C>( &self, chat_id: C, ) -> <Bot as Requester>::UnhideGeneralForumTopic
where C: Into<Recipient>,

For Telegram documentation see UnhideGeneralForumTopic.
Source§

fn unpin_all_general_forum_topic_messages<C>( &self, chat_id: C, ) -> <Bot as Requester>::UnpinAllGeneralForumTopicMessages
where C: Into<Recipient>,

For Telegram documentation see UnpinAllGeneralForumTopicMessages.
Source§

fn answer_callback_query( &self, callback_query_id: CallbackQueryId, ) -> <Bot as Requester>::AnswerCallbackQuery

For Telegram documentation see AnswerCallbackQuery.
Source§

fn get_user_chat_boosts<C>( &self, chat_id: C, user_id: UserId, ) -> <Bot as Requester>::GetUserChatBoosts
where C: Into<Recipient>,

For Telegram documentation see GetUserChatBoosts.
Source§

fn set_my_commands<C>(&self, commands: C) -> <Bot as Requester>::SetMyCommands
where C: IntoIterator<Item = BotCommand>,

For Telegram documentation see SetMyCommands.
Source§

fn get_business_connection( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::GetBusinessConnection

For Telegram documentation see GetBusinessConnection.
Source§

fn get_my_commands(&self) -> <Bot as Requester>::GetMyCommands

For Telegram documentation see GetMyCommands.
Source§

fn set_my_name(&self) -> <Bot as Requester>::SetMyName

For Telegram documentation see SetMyName.
Source§

fn get_my_name(&self) -> <Bot as Requester>::GetMyName

For Telegram documentation see GetMyName.
Source§

fn set_my_description(&self) -> <Bot as Requester>::SetMyDescription

For Telegram documentation see SetMyDescription.
Source§

fn get_my_description(&self) -> <Bot as Requester>::GetMyDescription

For Telegram documentation see GetMyDescription.
Source§

fn set_my_short_description(&self) -> <Bot as Requester>::SetMyShortDescription

For Telegram documentation see SetMyShortDescription.
Source§

fn get_my_short_description(&self) -> <Bot as Requester>::GetMyShortDescription

For Telegram documentation see GetMyShortDescription.
Source§

fn set_chat_menu_button(&self) -> <Bot as Requester>::SetChatMenuButton

For Telegram documentation see SetChatMenuButton.
Source§

fn get_chat_menu_button(&self) -> <Bot as Requester>::GetChatMenuButton

For Telegram documentation see GetChatMenuButton.
Source§

fn set_my_default_administrator_rights( &self, ) -> <Bot as Requester>::SetMyDefaultAdministratorRights

For Telegram documentation see SetMyDefaultAdministratorRights.
Source§

fn get_my_default_administrator_rights( &self, ) -> <Bot as Requester>::GetMyDefaultAdministratorRights

For Telegram documentation see GetMyDefaultAdministratorRights.
Source§

fn delete_my_commands(&self) -> <Bot as Requester>::DeleteMyCommands

For Telegram documentation see DeleteMyCommands.
Source§

fn answer_inline_query<R>( &self, inline_query_id: InlineQueryId, results: R, ) -> <Bot as Requester>::AnswerInlineQuery

For Telegram documentation see AnswerInlineQuery.
Source§

fn answer_web_app_query<W>( &self, web_app_query_id: W, result: InlineQueryResult, ) -> <Bot as Requester>::AnswerWebAppQuery
where W: Into<String>,

For Telegram documentation see AnswerWebAppQuery.
Source§

fn save_prepared_inline_message( &self, user_id: UserId, result: InlineQueryResult, ) -> <Bot as Requester>::SavePreparedInlineMessage

For Telegram documentation see SavePreparedInlineMessage.
Source§

fn edit_message_text<C, T>( &self, chat_id: C, message_id: MessageId, text: T, ) -> <Bot as Requester>::EditMessageText
where C: Into<Recipient>, T: Into<String>,

For Telegram documentation see EditMessageText.
Source§

fn edit_message_text_inline<I, T>( &self, inline_message_id: I, text: T, ) -> <Bot as Requester>::EditMessageTextInline
where I: Into<String>, T: Into<String>,

For Telegram documentation see EditMessageTextInline.
Source§

fn edit_message_caption<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::EditMessageCaption
where C: Into<Recipient>,

For Telegram documentation see EditMessageCaption.
Source§

fn edit_message_caption_inline<I>( &self, inline_message_id: I, ) -> <Bot as Requester>::EditMessageCaptionInline
where I: Into<String>,

For Telegram documentation see EditMessageCaptionInline.
Source§

fn edit_message_media<C>( &self, chat_id: C, message_id: MessageId, media: InputMedia, ) -> <Bot as Requester>::EditMessageMedia
where C: Into<Recipient>,

For Telegram documentation see EditMessageMedia.
Source§

fn edit_message_media_inline<I>( &self, inline_message_id: I, media: InputMedia, ) -> <Bot as Requester>::EditMessageMediaInline
where I: Into<String>,

For Telegram documentation see EditMessageMediaInline.
Source§

fn edit_message_reply_markup<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::EditMessageReplyMarkup
where C: Into<Recipient>,

For Telegram documentation see EditMessageReplyMarkup.
Source§

fn edit_message_reply_markup_inline<I>( &self, inline_message_id: I, ) -> <Bot as Requester>::EditMessageReplyMarkupInline
where I: Into<String>,

For Telegram documentation see EditMessageReplyMarkupInline.
Source§

fn stop_poll<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::StopPoll
where C: Into<Recipient>,

For Telegram documentation see StopPoll.
Source§

fn approve_suggested_post<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::ApproveSuggestedPost
where C: Into<ChatId>,

For Telegram documentation see ApproveSuggestedPost.
Source§

fn decline_suggested_post<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::DeclineSuggestedPost
where C: Into<ChatId>,

For Telegram documentation see DeclineSuggestedPost.
Source§

fn delete_message<C>( &self, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::DeleteMessage
where C: Into<Recipient>,

For Telegram documentation see DeleteMessage.
Source§

fn delete_messages<C, M>( &self, chat_id: C, message_ids: M, ) -> <Bot as Requester>::DeleteMessages
where C: Into<Recipient>, M: IntoIterator<Item = MessageId>,

For Telegram documentation see DeleteMessages.
Source§

fn send_sticker<C>( &self, chat_id: C, sticker: InputFile, ) -> <Bot as Requester>::SendSticker
where C: Into<Recipient>,

For Telegram documentation see SendSticker.
Source§

fn get_sticker_set<N>(&self, name: N) -> <Bot as Requester>::GetStickerSet
where N: Into<String>,

For Telegram documentation see GetStickerSet.
Source§

fn get_custom_emoji_stickers<C>( &self, custom_emoji_ids: C, ) -> <Bot as Requester>::GetCustomEmojiStickers
where C: IntoIterator<Item = CustomEmojiId>,

For Telegram documentation see GetCustomEmojiStickers.
Source§

fn upload_sticker_file( &self, user_id: UserId, sticker: InputFile, sticker_format: StickerFormat, ) -> <Bot as Requester>::UploadStickerFile

For Telegram documentation see UploadStickerFile.
Source§

fn create_new_sticker_set<N, T, S>( &self, user_id: UserId, name: N, title: T, stickers: S, ) -> <Bot as Requester>::CreateNewStickerSet
where N: Into<String>, T: Into<String>, S: IntoIterator<Item = InputSticker>,

For Telegram documentation see CreateNewStickerSet.
Source§

fn add_sticker_to_set<N>( &self, user_id: UserId, name: N, sticker: InputSticker, ) -> <Bot as Requester>::AddStickerToSet
where N: Into<String>,

For Telegram documentation see AddStickerToSet.
Source§

fn set_sticker_position_in_set<S>( &self, sticker: S, position: u32, ) -> <Bot as Requester>::SetStickerPositionInSet
where S: Into<String>,

For Telegram documentation see SetStickerPositionInSet.
Source§

fn delete_sticker_from_set<S>( &self, sticker: S, ) -> <Bot as Requester>::DeleteStickerFromSet
where S: Into<String>,

For Telegram documentation see DeleteStickerFromSet.
Source§

fn replace_sticker_in_set<N, O>( &self, user_id: UserId, name: N, old_sticker: O, sticker: InputSticker, ) -> <Bot as Requester>::ReplaceStickerInSet
where N: Into<String>, O: Into<String>,

For Telegram documentation see ReplaceStickerInSet.
Source§

fn set_sticker_set_thumbnail<N>( &self, name: N, user_id: UserId, format: StickerFormat, ) -> <Bot as Requester>::SetStickerSetThumbnail
where N: Into<String>,

For Telegram documentation see SetStickerSetThumbnail.
Source§

fn set_custom_emoji_sticker_set_thumbnail<N>( &self, name: N, ) -> <Bot as Requester>::SetCustomEmojiStickerSetThumbnail
where N: Into<String>,

For Telegram documentation see SetCustomEmojiStickerSetThumbnail.
Source§

fn set_sticker_set_title<N, T>( &self, name: N, title: T, ) -> <Bot as Requester>::SetStickerSetTitle
where N: Into<String>, T: Into<String>,

For Telegram documentation see SetStickerSetTitle.
Source§

fn delete_sticker_set<N>(&self, name: N) -> <Bot as Requester>::DeleteStickerSet
where N: Into<String>,

For Telegram documentation see DeleteStickerSet.
Source§

fn set_sticker_emoji_list<S, E>( &self, sticker: S, emoji_list: E, ) -> <Bot as Requester>::SetStickerEmojiList
where S: Into<String>, E: IntoIterator<Item = String>,

For Telegram documentation see SetStickerEmojiList.
Source§

fn set_sticker_keywords<S>( &self, sticker: S, ) -> <Bot as Requester>::SetStickerKeywords
where S: Into<String>,

For Telegram documentation see SetStickerKeywords.
Source§

fn set_sticker_mask_position<S>( &self, sticker: S, ) -> <Bot as Requester>::SetStickerMaskPosition
where S: Into<String>,

For Telegram documentation see SetStickerMaskPosition.
Source§

fn get_available_gifts(&self) -> <Bot as Requester>::GetAvailableGifts

For Telegram documentation see GetAvailableGifts.
Source§

fn send_gift( &self, user_id: UserId, gift_id: GiftId, ) -> <Bot as Requester>::SendGift

For Telegram documentation see SendGift.
Source§

fn send_gift_chat<C>( &self, chat_id: C, gift_id: GiftId, ) -> <Bot as Requester>::SendGiftChat
where C: Into<Recipient>,

For Telegram documentation see SendGiftChat.
Source§

fn gift_premium_subscription( &self, user_id: UserId, month_count: u8, star_count: u32, ) -> <Bot as Requester>::GiftPremiumSubscription

For Telegram documentation see GiftPremiumSubscription.
Source§

fn verify_user(&self, user_id: UserId) -> <Bot as Requester>::VerifyUser

For Telegram documentation see VerifyUser.
Source§

fn verify_chat<C>(&self, chat_id: C) -> <Bot as Requester>::VerifyChat
where C: Into<Recipient>,

For Telegram documentation see VerifyChat.
Source§

fn remove_user_verification( &self, user_id: UserId, ) -> <Bot as Requester>::RemoveUserVerification

For Telegram documentation see RemoveUserVerification.
Source§

fn remove_chat_verification<C>( &self, chat_id: C, ) -> <Bot as Requester>::RemoveChatVerification
where C: Into<Recipient>,

For Telegram documentation see RemoveChatVerification.
Source§

fn read_business_message<C>( &self, business_connection_id: BusinessConnectionId, chat_id: C, message_id: MessageId, ) -> <Bot as Requester>::ReadBusinessMessage
where C: Into<ChatId>,

For Telegram documentation see ReadBusinessMessage.
Source§

fn delete_business_messages<M>( &self, business_connection_id: BusinessConnectionId, message_ids: M, ) -> <Bot as Requester>::DeleteBusinessMessages
where M: IntoIterator<Item = MessageId>,

For Telegram documentation see DeleteBusinessMessages.
Source§

fn set_business_account_name<F>( &self, business_connection_id: BusinessConnectionId, first_name: F, ) -> <Bot as Requester>::SetBusinessAccountName
where F: Into<String>,

For Telegram documentation see SetBusinessAccountName.
Source§

fn set_business_account_username( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::SetBusinessAccountUsername

For Telegram documentation see SetBusinessAccountUsername.
Source§

fn set_business_account_bio( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::SetBusinessAccountBio

For Telegram documentation see SetBusinessAccountBio.
Source§

fn set_business_account_profile_photo( &self, business_connection_id: BusinessConnectionId, photo: InputProfilePhoto, ) -> <Bot as Requester>::SetBusinessAccountProfilePhoto

For Telegram documentation see SetBusinessAccountProfilePhoto.
Source§

fn remove_business_account_profile_photo( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::RemoveBusinessAccountProfilePhoto

For Telegram documentation see RemoveBusinessAccountProfilePhoto.
Source§

fn set_business_account_gift_settings( &self, business_connection_id: BusinessConnectionId, show_gift_button: bool, accepted_gift_types: AcceptedGiftTypes, ) -> <Bot as Requester>::SetBusinessAccountGiftSettings

For Telegram documentation see SetBusinessAccountGiftSettings.
Source§

fn get_business_account_star_balance( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::GetBusinessAccountStarBalance

For Telegram documentation see GetBusinessAccountStarBalance.
Source§

fn transfer_business_account_stars( &self, business_connection_id: BusinessConnectionId, star_count: u32, ) -> <Bot as Requester>::TransferBusinessAccountStars

For Telegram documentation see TransferBusinessAccountStars.
Source§

fn get_business_account_gifts( &self, business_connection_id: BusinessConnectionId, ) -> <Bot as Requester>::GetBusinessAccountGifts

For Telegram documentation see GetBusinessAccountGifts.
Source§

fn get_user_gifts(&self, user_id: UserId) -> <Bot as Requester>::GetUserGifts

For Telegram documentation see GetUserGifts.
Source§

fn get_chat_gifts<C>(&self, chat_id: C) -> <Bot as Requester>::GetChatGifts
where C: Into<Recipient>,

For Telegram documentation see GetChatGifts.
Source§

fn convert_gift_to_stars( &self, business_connection_id: BusinessConnectionId, owned_gift_id: OwnedGiftId, ) -> <Bot as Requester>::ConvertGiftToStars

For Telegram documentation see ConvertGiftToStars.
Source§

fn upgrade_gift( &self, business_connection_id: BusinessConnectionId, owned_gift_id: OwnedGiftId, ) -> <Bot as Requester>::UpgradeGift

For Telegram documentation see UpgradeGift.
Source§

fn transfer_gift<C>( &self, business_connection_id: BusinessConnectionId, owned_gift_id: OwnedGiftId, new_owner_chat_id: C, ) -> <Bot as Requester>::TransferGift
where C: Into<ChatId>,

For Telegram documentation see TransferGift.
Source§

fn post_story( &self, business_connection_id: BusinessConnectionId, content: InputStoryContent, active_period: Seconds, ) -> <Bot as Requester>::PostStory

For Telegram documentation see PostStory.
Source§

fn repost_story<F>( &self, business_connection_id: BusinessConnectionId, from_chat_id: F, from_story_id: StoryId, active_period: Seconds, ) -> <Bot as Requester>::RepostStory
where F: Into<ChatId>,

For Telegram documentation see RepostStory.
Source§

fn edit_story( &self, business_connection_id: BusinessConnectionId, story_id: StoryId, content: InputStoryContent, ) -> <Bot as Requester>::EditStory

For Telegram documentation see EditStory.
Source§

fn delete_story( &self, business_connection_id: BusinessConnectionId, story_id: StoryId, ) -> <Bot as Requester>::DeleteStory

For Telegram documentation see DeleteStory.
Source§

fn send_invoice<Ch, T, D, Pa, C, Pri>( &self, chat_id: Ch, title: T, description: D, payload: Pa, currency: C, prices: Pri, ) -> <Bot as Requester>::SendInvoice
where Ch: Into<Recipient>, T: Into<String>, D: Into<String>, Pa: Into<String>, C: Into<String>, Pri: IntoIterator<Item = LabeledPrice>,

For Telegram documentation see SendInvoice.
For Telegram documentation see CreateInvoiceLink.
Source§

fn answer_shipping_query( &self, shipping_query_id: ShippingQueryId, ok: bool, ) -> <Bot as Requester>::AnswerShippingQuery

For Telegram documentation see AnswerShippingQuery.
Source§

fn answer_pre_checkout_query( &self, pre_checkout_query_id: PreCheckoutQueryId, ok: bool, ) -> <Bot as Requester>::AnswerPreCheckoutQuery

For Telegram documentation see AnswerPreCheckoutQuery.
Source§

fn get_my_star_balance(&self) -> <Bot as Requester>::GetMyStarBalance

For Telegram documentation see GetMyStarBalance.
Source§

fn get_star_transactions(&self) -> <Bot as Requester>::GetStarTransactions

For Telegram documentation see GetStarTransactions.
Source§

fn refund_star_payment( &self, user_id: UserId, telegram_payment_charge_id: TelegramTransactionId, ) -> <Bot as Requester>::RefundStarPayment

For Telegram documentation see RefundStarPayment.
Source§

fn edit_user_star_subscription( &self, user_id: UserId, telegram_payment_charge_id: TelegramTransactionId, is_canceled: bool, ) -> <Bot as Requester>::EditUserStarSubscription

For Telegram documentation see EditUserStarSubscription.
Source§

fn set_passport_data_errors<E>( &self, user_id: UserId, errors: E, ) -> <Bot as Requester>::SetPassportDataErrors

For Telegram documentation see SetPassportDataErrors.
Source§

fn send_game<C, G>( &self, chat_id: C, game_short_name: G, ) -> <Bot as Requester>::SendGame
where C: Into<ChatId>, G: Into<String>,

For Telegram documentation see SendGame.
Source§

fn set_game_score( &self, user_id: UserId, score: u64, chat_id: u32, message_id: MessageId, ) -> <Bot as Requester>::SetGameScore

For Telegram documentation see SetGameScore.
Source§

fn set_game_score_inline<I>( &self, user_id: UserId, score: u64, inline_message_id: I, ) -> <Bot as Requester>::SetGameScoreInline
where I: Into<String>,

For Telegram documentation see SetGameScoreInline.
Source§

fn get_game_high_scores<T>( &self, user_id: UserId, target: T, ) -> <Bot as Requester>::GetGameHighScores
where T: Into<TargetMessage>,

For Telegram documentation see GetGameHighScores.
Source§

fn log_out(&self) -> <Bot as Requester>::LogOut

For Telegram documentation see LogOut.
Source§

fn close(&self) -> <Bot as Requester>::Close

For Telegram documentation see Close.
Source§

fn copy_message<C, F>( &self, chat_id: C, from_chat_id: F, message_id: MessageId, ) -> <Bot as Requester>::CopyMessage
where C: Into<Recipient>, F: Into<Recipient>,

For Telegram documentation see CopyMessage.
Source§

fn copy_messages<C, F, M>( &self, chat_id: C, from_chat_id: F, message_ids: M, ) -> <Bot as Requester>::CopyMessages
where C: Into<Recipient>, F: Into<Recipient>, M: IntoIterator<Item = MessageId>,

For Telegram documentation see CopyMessages.
Source§

fn unpin_all_chat_messages<C>( &self, chat_id: C, ) -> <Bot as Requester>::UnpinAllChatMessages
where C: Into<Recipient>,

For Telegram documentation see UnpinAllChatMessages.

Auto Trait Implementations§

§

impl Freeze for Bot

§

impl !RefUnwindSafe for Bot

§

impl Send for Bot

§

impl Sync for Bot

§

impl Unpin for Bot

§

impl !UnwindSafe for Bot

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<R> BotMessagesExt for R
where R: Requester,

Source§

fn forward<C>( &self, to_chat_id: C, message: &Message, ) -> <R as Requester>::ForwardMessage
where C: Into<Recipient>,

This function is the same as Bot::forward_message, but can take in Message to forward it.
Source§

fn edit_live_location( &self, message: &Message, latitude: f64, longitude: f64, ) -> <R as Requester>::EditMessageLiveLocation

This function is the same as Bot::edit_message_live_location, but can take in Message to edit it.
Source§

fn stop_live_location( &self, message: &Message, ) -> <R as Requester>::StopMessageLiveLocation

This function is the same as Bot::stop_message_live_location, but can take in Message to stop the live location in it.
Source§

fn set_reaction( &self, message: &Message, ) -> <R as Requester>::SetMessageReaction

This function is the same as Bot::set_message_reaction, but can take in Message to set a reaction on it.
Source§

fn pin(&self, message: &Message) -> <R as Requester>::PinChatMessage

This function is the same as Bot::pin_chat_message, but can take in Message to pin it.
Source§

fn unpin(&self, message: &Message) -> <R as Requester>::UnpinChatMessage

This function is the same as Bot::unpin_chat_message, but can take in Message to unpin it.
Source§

fn edit_text<T>( &self, message: &Message, text: T, ) -> <R as Requester>::EditMessageText
where T: Into<String>,

This function is the same as Bot::edit_message_text, but can take in Message to edit it.
Source§

fn edit_caption( &self, message: &Message, ) -> <R as Requester>::EditMessageCaption

This function is the same as Bot::edit_message_caption, but can take in Message to edit it.
Source§

fn edit_media( &self, message: &Message, media: InputMedia, ) -> <R as Requester>::EditMessageMedia

This function is the same as Bot::edit_message_media, but can take in Message to edit it.
Source§

fn edit_reply_markup( &self, message: &Message, ) -> <R as Requester>::EditMessageReplyMarkup

This function is the same as Bot::edit_message_reply_markup, but can take in Message to edit it.
Source§

fn stop_poll_message(&self, message: &Message) -> <R as Requester>::StopPoll

This function is the same as Bot::stop_poll, but can take in Message to stop the poll in it.
Source§

fn delete(&self, message: &Message) -> <R as Requester>::DeleteMessage

This function is the same as Bot::delete_message, but can take in Message to delete it.
Source§

fn copy<C>( &self, to_chat_id: C, message: &Message, ) -> <R as Requester>::CopyMessage
where C: Into<Recipient>,

This function is the same as Bot::copy_message, but can take in Message to copy it.
Source§

fn iter_star_transactions(&self) -> impl Stream<Item = StarTransaction>

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Erasable for T

Source§

const ACK_1_1_0: bool = true

Available on non-enforce_1_1_0_semantics only.
Whether this implementor has acknowledged the 1.1.0 update to unerase’s documented implementation requirements. Read more
Source§

unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>

Unerase this erased pointer. Read more
Source§

fn erase(this: NonNull<Self>) -> NonNull<Erased>

Turn this erasable pointer into an erased pointer. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> RequesterExt for T
where T: Requester,

Source§

fn cache_me(self) -> CacheMe<Self>
where Self: Sized,

Available on crate feature cache_me only.
Add get_me caching ability, see CacheMe for more.
Source§

fn erase<'a>(self) -> ErasedRequester<'a, Self::Err>
where Self: 'a + Sized,

Available on crate feature erased only.
Erase requester type.
Source§

fn trace(self, settings: Settings) -> Trace<Self>
where Self: Sized,

Available on crate feature trace_adaptor only.
Trace requests, see Trace for more.
Source§

fn throttle(self, limits: Limits) -> Throttle<Self>
where Self: Sized + Clone + Send + Sync + 'static, Self::Err: AsResponseParameters, Self::GetChat: Send,

Available on crate feature throttle only.
Add throttling ability, see Throttle for more. Read more
Source§

fn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode<Self>
where Self: Sized,

Specifies default ParseMode, which will be used during all calls to: Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more