pub trait TelegramApi {
type Error;
Show 159 methods
// Required methods
fn request<Params, Output>(
&self,
method: &str,
params: Option<Params>,
) -> Result<Output, Self::Error>
where Params: Serialize + Debug,
Output: DeserializeOwned;
fn request_with_form_data<Params, Output>(
&self,
method: &str,
params: Params,
files: Vec<(&str, PathBuf)>,
) -> Result<Output, Self::Error>
where Params: Serialize + Debug,
Output: DeserializeOwned;
// Provided methods
fn get_updates(
&self,
params: &GetUpdatesParams,
) -> Result<MethodResponse<Vec<Update>>, Self::Error> { ... }
fn send_message(
&self,
params: &SendMessageParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn set_webhook(
&self,
params: &SetWebhookParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_webhook(
&self,
params: &DeleteWebhookParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_webhook_info(
&self,
) -> Result<MethodResponse<WebhookInfo>, Self::Error> { ... }
fn get_me(&self) -> Result<MethodResponse<User>, Self::Error> { ... }
fn log_out(&self) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn close(&self) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn forward_message(
&self,
params: &ForwardMessageParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn forward_messages(
&self,
params: &ForwardMessagesParams,
) -> Result<MethodResponse<Vec<MessageId>>, Self::Error> { ... }
fn copy_message(
&self,
params: &CopyMessageParams,
) -> Result<MethodResponse<MessageId>, Self::Error> { ... }
fn copy_messages(
&self,
params: &CopyMessagesParams,
) -> Result<MethodResponse<Vec<MessageId>>, Self::Error> { ... }
fn send_photo(
&self,
params: &SendPhotoParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_audio(
&self,
params: &SendAudioParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_media_group(
&self,
params: &SendMediaGroupParams,
) -> Result<MethodResponse<Vec<Message>>, Self::Error> { ... }
fn send_document(
&self,
params: &SendDocumentParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_video(
&self,
params: &SendVideoParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_animation(
&self,
params: &SendAnimationParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_voice(
&self,
params: &SendVoiceParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_video_note(
&self,
params: &SendVideoNoteParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_paid_media(
&self,
params: &SendPaidMediaParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_location(
&self,
params: &SendLocationParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn edit_message_live_location(
&self,
params: &EditMessageLiveLocationParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn stop_message_live_location(
&self,
params: &StopMessageLiveLocationParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn send_checklist(
&self,
params: &SendChecklistParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn edit_message_checklist(
&self,
params: &EditMessageChecklistParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn send_venue(
&self,
params: &SendVenueParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_contact(
&self,
params: &SendContactParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_poll(
&self,
params: &SendPollParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_dice(
&self,
params: &SendDiceParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn send_chat_action(
&self,
params: &SendChatActionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_message_reaction(
&self,
params: &SetMessageReactionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_user_profile_photos(
&self,
params: &GetUserProfilePhotosParams,
) -> Result<MethodResponse<UserProfilePhotos>, Self::Error> { ... }
fn set_user_emoji_status(
&self,
params: &SetUserEmojiStatusParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_file(
&self,
params: &GetFileParams,
) -> Result<MethodResponse<File>, Self::Error> { ... }
fn ban_chat_member(
&self,
params: &BanChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unban_chat_member(
&self,
params: &UnbanChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn restrict_chat_member(
&self,
params: &RestrictChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn promote_chat_member(
&self,
params: &PromoteChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_chat_administrator_custom_title(
&self,
params: &SetChatAdministratorCustomTitleParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn ban_chat_sender_chat(
&self,
params: &BanChatSenderChatParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unban_chat_sender_chat(
&self,
params: &UnbanChatSenderChatParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_chat_permissions(
&self,
params: &SetChatPermissionsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn export_chat_invite_link(
&self,
params: &ExportChatInviteLinkParams,
) -> Result<MethodResponse<String>, Self::Error> { ... }
fn create_chat_invite_link(
&self,
params: &CreateChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error> { ... }
fn edit_chat_invite_link(
&self,
params: &EditChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error> { ... }
fn create_chat_subscription_invite_link(
&self,
params: &CreateChatSubscriptionInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error> { ... }
fn edit_chat_subscription_invite_link(
&self,
params: &EditChatSubscriptionInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error> { ... }
fn revoke_chat_invite_link(
&self,
params: &RevokeChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error> { ... }
fn approve_chat_join_request(
&self,
params: &ApproveChatJoinRequestParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn decline_chat_join_request(
&self,
params: &DeclineChatJoinRequestParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_chat_photo(
&self,
params: &SetChatPhotoParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_chat_photo(
&self,
params: &DeleteChatPhotoParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_chat_title(
&self,
params: &SetChatTitleParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_chat_description(
&self,
params: &SetChatDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn pin_chat_message(
&self,
params: &PinChatMessageParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unpin_chat_message(
&self,
params: &UnpinChatMessageParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unpin_all_chat_messages(
&self,
params: &UnpinAllChatMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn leave_chat(
&self,
params: &LeaveChatParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_chat(
&self,
params: &GetChatParams,
) -> Result<MethodResponse<ChatFullInfo>, Self::Error> { ... }
fn get_chat_administrators(
&self,
params: &GetChatAdministratorsParams,
) -> Result<MethodResponse<Vec<ChatMember>>, Self::Error> { ... }
fn get_chat_member_count(
&self,
params: &GetChatMemberCountParams,
) -> Result<MethodResponse<u32>, Self::Error> { ... }
fn get_chat_member(
&self,
params: &GetChatMemberParams,
) -> Result<MethodResponse<ChatMember>, Self::Error> { ... }
fn set_chat_sticker_set(
&self,
params: &SetChatStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_chat_sticker_set(
&self,
params: &DeleteChatStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_forum_topic_icon_stickers(
&self,
) -> Result<MethodResponse<Vec<Sticker>>, Self::Error> { ... }
fn create_forum_topic(
&self,
params: &CreateForumTopicParams,
) -> Result<MethodResponse<ForumTopic>, Self::Error> { ... }
fn edit_forum_topic(
&self,
params: &EditForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn close_forum_topic(
&self,
params: &CloseForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn reopen_forum_topic(
&self,
params: &ReopenForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_forum_topic(
&self,
params: &DeleteForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unpin_all_forum_topic_messages(
&self,
params: &UnpinAllForumTopicMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn edit_general_forum_topic(
&self,
params: &EditGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn close_general_forum_topic(
&self,
params: &CloseGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn reopen_general_forum_topic(
&self,
params: &ReopenGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn hide_general_forum_topic(
&self,
params: &HideGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn unhide_general_forum_topic(
&self,
params: &UnhideGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn answer_callback_query(
&self,
params: &AnswerCallbackQueryParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_user_chat_boosts(
&self,
params: &GetUserChatBoostsParams,
) -> Result<MethodResponse<UserChatBoosts>, Self::Error> { ... }
fn get_business_connection(
&self,
params: &GetBusinessConnectionParams,
) -> Result<MethodResponse<BusinessConnection>, Self::Error> { ... }
fn get_my_commands(
&self,
params: &GetMyCommandsParams,
) -> Result<MethodResponse<Vec<BotCommand>>, Self::Error> { ... }
fn set_my_commands(
&self,
params: &SetMyCommandsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_my_commands(
&self,
params: &DeleteMyCommandsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_my_name(
&self,
params: &SetMyNameParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_my_name(
&self,
params: &GetMyNameParams,
) -> Result<MethodResponse<BotName>, Self::Error> { ... }
fn set_my_description(
&self,
params: &SetMyDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_my_description(
&self,
params: &GetMyDescriptionParams,
) -> Result<MethodResponse<BotDescription>, Self::Error> { ... }
fn set_my_short_description(
&self,
params: &SetMyShortDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_my_short_description(
&self,
params: &GetMyShortDescriptionParams,
) -> Result<MethodResponse<BotShortDescription>, Self::Error> { ... }
fn answer_inline_query(
&self,
params: &AnswerInlineQueryParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn edit_message_text(
&self,
params: &EditMessageTextParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn edit_message_caption(
&self,
params: &EditMessageCaptionParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn edit_message_media(
&self,
params: &EditMessageMediaParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn edit_message_reply_markup(
&self,
params: &EditMessageReplyMarkupParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn stop_poll(
&self,
params: &StopPollParams,
) -> Result<MethodResponse<Poll>, Self::Error> { ... }
fn delete_message(
&self,
params: &DeleteMessageParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_messages(
&self,
params: &DeleteMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn send_sticker(
&self,
params: &SendStickerParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn get_sticker_set(
&self,
params: &GetStickerSetParams,
) -> Result<MethodResponse<StickerSet>, Self::Error> { ... }
fn upload_sticker_file(
&self,
params: &UploadStickerFileParams,
) -> Result<MethodResponse<File>, Self::Error> { ... }
fn create_new_sticker_set(
&self,
params: &CreateNewStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_custom_emoji_stickers(
&self,
params: &GetCustomEmojiStickersParams,
) -> Result<MethodResponse<Vec<Sticker>>, Self::Error> { ... }
fn add_sticker_to_set(
&self,
params: &AddStickerToSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_position_in_set(
&self,
params: &SetStickerPositionInSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_sticker_from_set(
&self,
params: &DeleteStickerFromSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn replace_sticker_in_set(
&self,
params: &ReplaceStickerInSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_emoji_list(
&self,
params: &SetStickerEmojiListParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_keywords(
&self,
params: &SetStickerKeywordsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_mask_position(
&self,
params: &SetStickerMaskPositionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_set_title(
&self,
params: &SetStickerSetTitleParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_sticker_set_thumbnail(
&self,
params: &SetStickerSetThumbnailParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_custom_emoji_sticker_set_thumbnail(
&self,
params: &SetCustomEmojiStickerSetThumbnailParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_sticker_set(
&self,
params: &DeleteStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_available_gifts(&self) -> Result<MethodResponse<Gifts>, Self::Error> { ... }
fn send_gift(
&self,
params: &SendGiftParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn gift_premium_subscription(
&self,
params: &GiftPremiumSubscriptionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn verify_user(
&self,
params: &VerifyUserParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn verify_chat(
&self,
params: &VerifyChatParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn remove_user_verification(
&self,
params: &RemoveUserVerificationParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn remove_chat_verification(
&self,
params: &RemoveChatVerificationParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn read_business_message(
&self,
params: &ReadBusinessMessageParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn delete_business_messages(
&self,
params: &DeleteBusinessMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_business_account_name(
&self,
params: &SetBusinessAccountNameParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_business_account_username(
&self,
params: &SetBusinessAccountUsernameParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_business_account_bio(
&self,
params: &SetBusinessAccountBioParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_business_account_profile_photo(
&self,
params: &SetBusinessAccountProfilePhotoParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn remove_business_account_profile_photo(
&self,
params: &RemoveBusinessAccountProfilePhotoParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_business_account_gift_settings(
&self,
params: &SetBusinessAccountGiftSettingsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_business_account_star_balance(
&self,
params: &GetBusinessAccountStarBalanceParams,
) -> Result<MethodResponse<StarAmount>, Self::Error> { ... }
fn transfer_business_account_stars(
&self,
params: &TransferBusinessAccountStarsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_business_account_gifts(
&self,
params: &GetBusinessAccountGiftsParams,
) -> Result<MethodResponse<OwnedGifts>, Self::Error> { ... }
fn convert_gift_to_stars(
&self,
params: &ConvertGiftToStarsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn upgrade_gift(
&self,
params: &UpgradeGiftParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn transfer_gift(
&self,
params: &TransferGiftParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn post_story(
&self,
params: &PostStoryParams,
) -> Result<MethodResponse<Story>, Self::Error> { ... }
fn edit_story(
&self,
params: &EditStoryParams,
) -> Result<MethodResponse<Story>, Self::Error> { ... }
fn delete_story(
&self,
params: &DeleteStoryParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn send_invoice(
&self,
params: &SendInvoiceParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn create_invoice_link(
&self,
params: &CreateInvoiceLinkParams,
) -> Result<MethodResponse<String>, Self::Error> { ... }
fn answer_shipping_query(
&self,
params: &AnswerShippingQueryParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn answer_pre_checkout_query(
&self,
params: &AnswerPreCheckoutQueryParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_my_star_balance(&self) -> Result<MethodResponse<u32>, Self::Error> { ... }
fn get_star_transactions(
&self,
params: &GetStarTransactionsParams,
) -> Result<MethodResponse<StarTransactions>, Self::Error> { ... }
fn refund_star_payment(
&self,
params: &RefundStarPaymentParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn edit_user_star_subscription(
&self,
params: &EditUserStarSubscriptionParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn send_game(
&self,
params: &SendGameParams,
) -> Result<MethodResponse<Message>, Self::Error> { ... }
fn set_game_score(
&self,
params: &SetGameScoreParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error> { ... }
fn get_game_high_scores(
&self,
params: &GetGameHighScoresParams,
) -> Result<MethodResponse<Vec<GameHighScore>>, Self::Error> { ... }
fn set_my_default_administrator_rights(
&self,
params: &SetMyDefaultAdministratorRightsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_my_default_administrator_rights(
&self,
params: &GetMyDefaultAdministratorRightsParams,
) -> Result<MethodResponse<ChatAdministratorRights>, Self::Error> { ... }
fn answer_web_app_query(
&self,
params: &AnswerWebAppQueryParams,
) -> Result<MethodResponse<SentWebAppMessage>, Self::Error> { ... }
fn save_prepared_inline_message(
&self,
params: &SavePreparedInlineMessageParams,
) -> Result<MethodResponse<PreparedInlineMessage>, Self::Error> { ... }
fn set_chat_menu_button(
&self,
params: &SetChatMenuButtonParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn get_chat_menu_button(
&self,
params: &GetChatMenuButtonParams,
) -> Result<MethodResponse<MenuButton>, Self::Error> { ... }
fn unpin_all_general_forum_topic_messages(
&self,
params: &UnpinAllGeneralForumTopicMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn set_passport_data_errors(
&self,
params: &SetPassportDataErrorsParams,
) -> Result<MethodResponse<bool>, Self::Error> { ... }
fn request_with_possible_form_data<Params, Output>(
&self,
method_name: &str,
params: Params,
files: Vec<(&str, PathBuf)>,
) -> Result<Output, Self::Error>
where Params: Serialize + Debug,
Output: DeserializeOwned { ... }
}
trait-sync
only.Required Associated Types§
Required Methods§
fn request<Params, Output>( &self, method: &str, params: Option<Params>, ) -> Result<Output, Self::Error>
fn request_with_form_data<Params, Output>( &self, method: &str, params: Params, files: Vec<(&str, PathBuf)>, ) -> Result<Output, Self::Error>
Provided Methods§
Sourcefn get_updates(
&self,
params: &GetUpdatesParams,
) -> Result<MethodResponse<Vec<Update>>, Self::Error>
fn get_updates( &self, params: &GetUpdatesParams, ) -> Result<MethodResponse<Vec<Update>>, Self::Error>
Call the getUpdates
method.
Sourcefn send_message(
&self,
params: &SendMessageParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_message( &self, params: &SendMessageParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendMessage
method.
Sourcefn set_webhook(
&self,
params: &SetWebhookParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_webhook( &self, params: &SetWebhookParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setWebhook
method.
Sourcefn delete_webhook(
&self,
params: &DeleteWebhookParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_webhook( &self, params: &DeleteWebhookParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteWebhook
method.
Sourcefn get_webhook_info(&self) -> Result<MethodResponse<WebhookInfo>, Self::Error>
fn get_webhook_info(&self) -> Result<MethodResponse<WebhookInfo>, Self::Error>
Call the getWebhookInfo
method.
Sourcefn forward_message(
&self,
params: &ForwardMessageParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn forward_message( &self, params: &ForwardMessageParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the forwardMessage
method.
Sourcefn forward_messages(
&self,
params: &ForwardMessagesParams,
) -> Result<MethodResponse<Vec<MessageId>>, Self::Error>
fn forward_messages( &self, params: &ForwardMessagesParams, ) -> Result<MethodResponse<Vec<MessageId>>, Self::Error>
Call the forwardMessages
method.
Sourcefn copy_message(
&self,
params: &CopyMessageParams,
) -> Result<MethodResponse<MessageId>, Self::Error>
fn copy_message( &self, params: &CopyMessageParams, ) -> Result<MethodResponse<MessageId>, Self::Error>
Call the copyMessage
method.
Sourcefn copy_messages(
&self,
params: &CopyMessagesParams,
) -> Result<MethodResponse<Vec<MessageId>>, Self::Error>
fn copy_messages( &self, params: &CopyMessagesParams, ) -> Result<MethodResponse<Vec<MessageId>>, Self::Error>
Call the copyMessages
method.
Sourcefn send_photo(
&self,
params: &SendPhotoParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_photo( &self, params: &SendPhotoParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendPhoto
method.
Sourcefn send_audio(
&self,
params: &SendAudioParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_audio( &self, params: &SendAudioParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendAudio
method.
fn send_media_group( &self, params: &SendMediaGroupParams, ) -> Result<MethodResponse<Vec<Message>>, Self::Error>
Sourcefn send_document(
&self,
params: &SendDocumentParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_document( &self, params: &SendDocumentParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendDocument
method.
Sourcefn send_video(
&self,
params: &SendVideoParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_video( &self, params: &SendVideoParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendVideo
method.
Sourcefn send_animation(
&self,
params: &SendAnimationParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_animation( &self, params: &SendAnimationParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendAnimation
method.
Sourcefn send_voice(
&self,
params: &SendVoiceParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_voice( &self, params: &SendVoiceParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendVoice
method.
Sourcefn send_video_note(
&self,
params: &SendVideoNoteParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_video_note( &self, params: &SendVideoNoteParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendVideoNote
method.
Sourcefn send_paid_media(
&self,
params: &SendPaidMediaParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_paid_media( &self, params: &SendPaidMediaParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendPaidMedia
method.
Sourcefn send_location(
&self,
params: &SendLocationParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_location( &self, params: &SendLocationParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendLocation
method.
Sourcefn edit_message_live_location(
&self,
params: &EditMessageLiveLocationParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn edit_message_live_location( &self, params: &EditMessageLiveLocationParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the editMessageLiveLocation
method.
See https://core.telegram.org/bots/api#editmessagelivelocation.
Sourcefn stop_message_live_location(
&self,
params: &StopMessageLiveLocationParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn stop_message_live_location( &self, params: &StopMessageLiveLocationParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the stopMessageLiveLocation
method.
See https://core.telegram.org/bots/api#stopmessagelivelocation.
Sourcefn send_checklist(
&self,
params: &SendChecklistParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn send_checklist( &self, params: &SendChecklistParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the sendChecklist
method.
Sourcefn edit_message_checklist(
&self,
params: &EditMessageChecklistParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn edit_message_checklist( &self, params: &EditMessageChecklistParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the editMessageChecklist
method.
See https://core.telegram.org/bots/api#editmessagechecklist.
Sourcefn send_venue(
&self,
params: &SendVenueParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_venue( &self, params: &SendVenueParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendVenue
method.
Sourcefn send_contact(
&self,
params: &SendContactParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_contact( &self, params: &SendContactParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendContact
method.
Sourcefn send_poll(
&self,
params: &SendPollParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_poll( &self, params: &SendPollParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendPoll
method.
Sourcefn send_dice(
&self,
params: &SendDiceParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_dice( &self, params: &SendDiceParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendDice
method.
Sourcefn send_chat_action(
&self,
params: &SendChatActionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn send_chat_action( &self, params: &SendChatActionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the sendChatAction
method.
Sourcefn set_message_reaction(
&self,
params: &SetMessageReactionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_message_reaction( &self, params: &SetMessageReactionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMessageReaction
method.
Sourcefn get_user_profile_photos(
&self,
params: &GetUserProfilePhotosParams,
) -> Result<MethodResponse<UserProfilePhotos>, Self::Error>
fn get_user_profile_photos( &self, params: &GetUserProfilePhotosParams, ) -> Result<MethodResponse<UserProfilePhotos>, Self::Error>
Call the getUserProfilePhotos
method.
See https://core.telegram.org/bots/api#getuserprofilephotos.
Sourcefn set_user_emoji_status(
&self,
params: &SetUserEmojiStatusParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_user_emoji_status( &self, params: &SetUserEmojiStatusParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setUserEmojiStatus
method.
Sourcefn get_file(
&self,
params: &GetFileParams,
) -> Result<MethodResponse<File>, Self::Error>
fn get_file( &self, params: &GetFileParams, ) -> Result<MethodResponse<File>, Self::Error>
Call the getFile
method.
Sourcefn ban_chat_member(
&self,
params: &BanChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn ban_chat_member( &self, params: &BanChatMemberParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the banChatMember
method.
Sourcefn unban_chat_member(
&self,
params: &UnbanChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unban_chat_member( &self, params: &UnbanChatMemberParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unbanChatMember
method.
Sourcefn restrict_chat_member(
&self,
params: &RestrictChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn restrict_chat_member( &self, params: &RestrictChatMemberParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the restrictChatMember
method.
Sourcefn promote_chat_member(
&self,
params: &PromoteChatMemberParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn promote_chat_member( &self, params: &PromoteChatMemberParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the promoteChatMember
method.
Sourcefn set_chat_administrator_custom_title(
&self,
params: &SetChatAdministratorCustomTitleParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_chat_administrator_custom_title( &self, params: &SetChatAdministratorCustomTitleParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setChatAdministratorCustomTitle
method.
See https://core.telegram.org/bots/api#setchatadministratorcustomtitle.
Sourcefn ban_chat_sender_chat(
&self,
params: &BanChatSenderChatParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn ban_chat_sender_chat( &self, params: &BanChatSenderChatParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the banChatSenderChat
method.
Sourcefn unban_chat_sender_chat(
&self,
params: &UnbanChatSenderChatParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unban_chat_sender_chat( &self, params: &UnbanChatSenderChatParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unbanChatSenderChat
method.
Sourcefn set_chat_permissions(
&self,
params: &SetChatPermissionsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_chat_permissions( &self, params: &SetChatPermissionsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setChatPermissions
method.
Sourcefn export_chat_invite_link(
&self,
params: &ExportChatInviteLinkParams,
) -> Result<MethodResponse<String>, Self::Error>
fn export_chat_invite_link( &self, params: &ExportChatInviteLinkParams, ) -> Result<MethodResponse<String>, Self::Error>
Call the exportChatInviteLink
method.
See https://core.telegram.org/bots/api#exportchatinvitelink.
Sourcefn create_chat_invite_link(
&self,
params: &CreateChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
fn create_chat_invite_link( &self, params: &CreateChatInviteLinkParams, ) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
Call the createChatInviteLink
method.
See https://core.telegram.org/bots/api#createchatinvitelink.
Sourcefn edit_chat_invite_link(
&self,
params: &EditChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
fn edit_chat_invite_link( &self, params: &EditChatInviteLinkParams, ) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
Call the editChatInviteLink
method.
Sourcefn create_chat_subscription_invite_link(
&self,
params: &CreateChatSubscriptionInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
fn create_chat_subscription_invite_link( &self, params: &CreateChatSubscriptionInviteLinkParams, ) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
Call the createChatSubscriptionInviteLink
method.
See https://core.telegram.org/bots/api#createchatsubscriptioninvitelink.
Sourcefn edit_chat_subscription_invite_link(
&self,
params: &EditChatSubscriptionInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
fn edit_chat_subscription_invite_link( &self, params: &EditChatSubscriptionInviteLinkParams, ) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
Call the editChatSubscriptionInviteLink
method.
See https://core.telegram.org/bots/api#editchatsubscriptioninvitelink.
Sourcefn revoke_chat_invite_link(
&self,
params: &RevokeChatInviteLinkParams,
) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
fn revoke_chat_invite_link( &self, params: &RevokeChatInviteLinkParams, ) -> Result<MethodResponse<ChatInviteLink>, Self::Error>
Call the revokeChatInviteLink
method.
See https://core.telegram.org/bots/api#revokechatinvitelink.
Sourcefn approve_chat_join_request(
&self,
params: &ApproveChatJoinRequestParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn approve_chat_join_request( &self, params: &ApproveChatJoinRequestParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the approveChatJoinRequest
method.
See https://core.telegram.org/bots/api#approvechatjoinrequest.
Sourcefn decline_chat_join_request(
&self,
params: &DeclineChatJoinRequestParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn decline_chat_join_request( &self, params: &DeclineChatJoinRequestParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the declineChatJoinRequest
method.
See https://core.telegram.org/bots/api#declinechatjoinrequest.
fn set_chat_photo( &self, params: &SetChatPhotoParams, ) -> Result<MethodResponse<bool>, Self::Error>
Sourcefn delete_chat_photo(
&self,
params: &DeleteChatPhotoParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_chat_photo( &self, params: &DeleteChatPhotoParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteChatPhoto
method.
Sourcefn set_chat_title(
&self,
params: &SetChatTitleParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_chat_title( &self, params: &SetChatTitleParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setChatTitle
method.
Sourcefn set_chat_description(
&self,
params: &SetChatDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_chat_description( &self, params: &SetChatDescriptionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setChatDescription
method.
Sourcefn pin_chat_message(
&self,
params: &PinChatMessageParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn pin_chat_message( &self, params: &PinChatMessageParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the pinChatMessage
method.
Sourcefn unpin_chat_message(
&self,
params: &UnpinChatMessageParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unpin_chat_message( &self, params: &UnpinChatMessageParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unpinChatMessage
method.
Sourcefn unpin_all_chat_messages(
&self,
params: &UnpinAllChatMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unpin_all_chat_messages( &self, params: &UnpinAllChatMessagesParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unpinAllChatMessages
method.
See https://core.telegram.org/bots/api#unpinallchatmessages.
Sourcefn leave_chat(
&self,
params: &LeaveChatParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn leave_chat( &self, params: &LeaveChatParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the leaveChat
method.
Sourcefn get_chat(
&self,
params: &GetChatParams,
) -> Result<MethodResponse<ChatFullInfo>, Self::Error>
fn get_chat( &self, params: &GetChatParams, ) -> Result<MethodResponse<ChatFullInfo>, Self::Error>
Call the getChat
method.
Sourcefn get_chat_administrators(
&self,
params: &GetChatAdministratorsParams,
) -> Result<MethodResponse<Vec<ChatMember>>, Self::Error>
fn get_chat_administrators( &self, params: &GetChatAdministratorsParams, ) -> Result<MethodResponse<Vec<ChatMember>>, Self::Error>
Call the getChatAdministrators
method.
See https://core.telegram.org/bots/api#getchatadministrators.
Sourcefn get_chat_member_count(
&self,
params: &GetChatMemberCountParams,
) -> Result<MethodResponse<u32>, Self::Error>
fn get_chat_member_count( &self, params: &GetChatMemberCountParams, ) -> Result<MethodResponse<u32>, Self::Error>
Call the getChatMemberCount
method.
Sourcefn get_chat_member(
&self,
params: &GetChatMemberParams,
) -> Result<MethodResponse<ChatMember>, Self::Error>
fn get_chat_member( &self, params: &GetChatMemberParams, ) -> Result<MethodResponse<ChatMember>, Self::Error>
Call the getChatMember
method.
Sourcefn set_chat_sticker_set(
&self,
params: &SetChatStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_chat_sticker_set( &self, params: &SetChatStickerSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setChatStickerSet
method.
Sourcefn delete_chat_sticker_set(
&self,
params: &DeleteChatStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_chat_sticker_set( &self, params: &DeleteChatStickerSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteChatStickerSet
method.
See https://core.telegram.org/bots/api#deletechatstickerset.
Sourcefn get_forum_topic_icon_stickers(
&self,
) -> Result<MethodResponse<Vec<Sticker>>, Self::Error>
fn get_forum_topic_icon_stickers( &self, ) -> Result<MethodResponse<Vec<Sticker>>, Self::Error>
Call the getForumTopicIconStickers
method.
See https://core.telegram.org/bots/api#getforumtopiciconstickers.
Sourcefn create_forum_topic(
&self,
params: &CreateForumTopicParams,
) -> Result<MethodResponse<ForumTopic>, Self::Error>
fn create_forum_topic( &self, params: &CreateForumTopicParams, ) -> Result<MethodResponse<ForumTopic>, Self::Error>
Call the createForumTopic
method.
Sourcefn edit_forum_topic(
&self,
params: &EditForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn edit_forum_topic( &self, params: &EditForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the editForumTopic
method.
Sourcefn close_forum_topic(
&self,
params: &CloseForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn close_forum_topic( &self, params: &CloseForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the closeForumTopic
method.
Sourcefn reopen_forum_topic(
&self,
params: &ReopenForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn reopen_forum_topic( &self, params: &ReopenForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the reopenForumTopic
method.
Sourcefn delete_forum_topic(
&self,
params: &DeleteForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_forum_topic( &self, params: &DeleteForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteForumTopic
method.
Sourcefn unpin_all_forum_topic_messages(
&self,
params: &UnpinAllForumTopicMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unpin_all_forum_topic_messages( &self, params: &UnpinAllForumTopicMessagesParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unpinAllForumTopicMessages
method.
See https://core.telegram.org/bots/api#unpinallforumtopicmessages.
Sourcefn edit_general_forum_topic(
&self,
params: &EditGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn edit_general_forum_topic( &self, params: &EditGeneralForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the editGeneralForumTopic
method.
See https://core.telegram.org/bots/api#editgeneralforumtopic.
Sourcefn close_general_forum_topic(
&self,
params: &CloseGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn close_general_forum_topic( &self, params: &CloseGeneralForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the closeGeneralForumTopic
method.
See https://core.telegram.org/bots/api#closegeneralforumtopic.
Sourcefn reopen_general_forum_topic(
&self,
params: &ReopenGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn reopen_general_forum_topic( &self, params: &ReopenGeneralForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the reopenGeneralForumTopic
method.
See https://core.telegram.org/bots/api#reopengeneralforumtopic.
Sourcefn hide_general_forum_topic(
&self,
params: &HideGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn hide_general_forum_topic( &self, params: &HideGeneralForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the hideGeneralForumTopic
method.
See https://core.telegram.org/bots/api#hidegeneralforumtopic.
Sourcefn unhide_general_forum_topic(
&self,
params: &UnhideGeneralForumTopicParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unhide_general_forum_topic( &self, params: &UnhideGeneralForumTopicParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unhideGeneralForumTopic
method.
See https://core.telegram.org/bots/api#unhidegeneralforumtopic.
Sourcefn answer_callback_query(
&self,
params: &AnswerCallbackQueryParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn answer_callback_query( &self, params: &AnswerCallbackQueryParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the answerCallbackQuery
method.
Sourcefn get_user_chat_boosts(
&self,
params: &GetUserChatBoostsParams,
) -> Result<MethodResponse<UserChatBoosts>, Self::Error>
fn get_user_chat_boosts( &self, params: &GetUserChatBoostsParams, ) -> Result<MethodResponse<UserChatBoosts>, Self::Error>
Call the getUserChatBoosts
method.
Sourcefn get_business_connection(
&self,
params: &GetBusinessConnectionParams,
) -> Result<MethodResponse<BusinessConnection>, Self::Error>
fn get_business_connection( &self, params: &GetBusinessConnectionParams, ) -> Result<MethodResponse<BusinessConnection>, Self::Error>
Call the getBusinessConnection
method.
See https://core.telegram.org/bots/api#getbusinessconnection.
Sourcefn get_my_commands(
&self,
params: &GetMyCommandsParams,
) -> Result<MethodResponse<Vec<BotCommand>>, Self::Error>
fn get_my_commands( &self, params: &GetMyCommandsParams, ) -> Result<MethodResponse<Vec<BotCommand>>, Self::Error>
Call the getMyCommands
method.
Sourcefn set_my_commands(
&self,
params: &SetMyCommandsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_my_commands( &self, params: &SetMyCommandsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMyCommands
method.
Sourcefn delete_my_commands(
&self,
params: &DeleteMyCommandsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_my_commands( &self, params: &DeleteMyCommandsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteMyCommands
method.
Sourcefn set_my_name(
&self,
params: &SetMyNameParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_my_name( &self, params: &SetMyNameParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMyName
method.
Sourcefn get_my_name(
&self,
params: &GetMyNameParams,
) -> Result<MethodResponse<BotName>, Self::Error>
fn get_my_name( &self, params: &GetMyNameParams, ) -> Result<MethodResponse<BotName>, Self::Error>
Call the getMyName
method.
Sourcefn set_my_description(
&self,
params: &SetMyDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_my_description( &self, params: &SetMyDescriptionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMyDescription
method.
Sourcefn get_my_description(
&self,
params: &GetMyDescriptionParams,
) -> Result<MethodResponse<BotDescription>, Self::Error>
fn get_my_description( &self, params: &GetMyDescriptionParams, ) -> Result<MethodResponse<BotDescription>, Self::Error>
Call the getMyDescription
method.
Sourcefn set_my_short_description(
&self,
params: &SetMyShortDescriptionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_my_short_description( &self, params: &SetMyShortDescriptionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMyShortDescription
method.
See https://core.telegram.org/bots/api#setmyshortdescription.
Sourcefn get_my_short_description(
&self,
params: &GetMyShortDescriptionParams,
) -> Result<MethodResponse<BotShortDescription>, Self::Error>
fn get_my_short_description( &self, params: &GetMyShortDescriptionParams, ) -> Result<MethodResponse<BotShortDescription>, Self::Error>
Call the getMyShortDescription
method.
See https://core.telegram.org/bots/api#getmyshortdescription.
Sourcefn answer_inline_query(
&self,
params: &AnswerInlineQueryParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn answer_inline_query( &self, params: &AnswerInlineQueryParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the answerInlineQuery
method.
Sourcefn edit_message_text(
&self,
params: &EditMessageTextParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn edit_message_text( &self, params: &EditMessageTextParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the editMessageText
method.
Sourcefn edit_message_caption(
&self,
params: &EditMessageCaptionParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn edit_message_caption( &self, params: &EditMessageCaptionParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the editMessageCaption
method.
fn edit_message_media( &self, params: &EditMessageMediaParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Sourcefn edit_message_reply_markup(
&self,
params: &EditMessageReplyMarkupParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn edit_message_reply_markup( &self, params: &EditMessageReplyMarkupParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the editMessageReplyMarkup
method.
See https://core.telegram.org/bots/api#editmessagereplymarkup.
Sourcefn stop_poll(
&self,
params: &StopPollParams,
) -> Result<MethodResponse<Poll>, Self::Error>
fn stop_poll( &self, params: &StopPollParams, ) -> Result<MethodResponse<Poll>, Self::Error>
Call the stopPoll
method.
Sourcefn delete_message(
&self,
params: &DeleteMessageParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_message( &self, params: &DeleteMessageParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteMessage
method.
Sourcefn delete_messages(
&self,
params: &DeleteMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_messages( &self, params: &DeleteMessagesParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteMessages
method.
Sourcefn send_sticker(
&self,
params: &SendStickerParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_sticker( &self, params: &SendStickerParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendSticker
method.
Sourcefn get_sticker_set(
&self,
params: &GetStickerSetParams,
) -> Result<MethodResponse<StickerSet>, Self::Error>
fn get_sticker_set( &self, params: &GetStickerSetParams, ) -> Result<MethodResponse<StickerSet>, Self::Error>
Call the getStickerSet
method.
fn upload_sticker_file( &self, params: &UploadStickerFileParams, ) -> Result<MethodResponse<File>, Self::Error>
fn create_new_sticker_set( &self, params: &CreateNewStickerSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Sourcefn get_custom_emoji_stickers(
&self,
params: &GetCustomEmojiStickersParams,
) -> Result<MethodResponse<Vec<Sticker>>, Self::Error>
fn get_custom_emoji_stickers( &self, params: &GetCustomEmojiStickersParams, ) -> Result<MethodResponse<Vec<Sticker>>, Self::Error>
Call the getCustomEmojiStickers
method.
See https://core.telegram.org/bots/api#getcustomemojistickers.
fn add_sticker_to_set( &self, params: &AddStickerToSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Sourcefn set_sticker_position_in_set(
&self,
params: &SetStickerPositionInSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_position_in_set( &self, params: &SetStickerPositionInSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerPositionInSet
method.
See https://core.telegram.org/bots/api#setstickerpositioninset.
Sourcefn delete_sticker_from_set(
&self,
params: &DeleteStickerFromSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_sticker_from_set( &self, params: &DeleteStickerFromSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteStickerFromSet
method.
See https://core.telegram.org/bots/api#deletestickerfromset.
Sourcefn replace_sticker_in_set(
&self,
params: &ReplaceStickerInSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn replace_sticker_in_set( &self, params: &ReplaceStickerInSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the replaceStickerInSet
method.
Sourcefn set_sticker_emoji_list(
&self,
params: &SetStickerEmojiListParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_emoji_list( &self, params: &SetStickerEmojiListParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerEmojiList
method.
Sourcefn set_sticker_keywords(
&self,
params: &SetStickerKeywordsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_keywords( &self, params: &SetStickerKeywordsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerKeywords
method.
Sourcefn set_sticker_mask_position(
&self,
params: &SetStickerMaskPositionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_mask_position( &self, params: &SetStickerMaskPositionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerMaskPosition
method.
See https://core.telegram.org/bots/api#setstickermaskposition.
Sourcefn set_sticker_set_title(
&self,
params: &SetStickerSetTitleParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_set_title( &self, params: &SetStickerSetTitleParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerSetTitle
method.
Sourcefn set_sticker_set_thumbnail(
&self,
params: &SetStickerSetThumbnailParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_sticker_set_thumbnail( &self, params: &SetStickerSetThumbnailParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setStickerSetThumbnail
method.
See https://core.telegram.org/bots/api#setstickersetthumbnail.
Sourcefn set_custom_emoji_sticker_set_thumbnail(
&self,
params: &SetCustomEmojiStickerSetThumbnailParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_custom_emoji_sticker_set_thumbnail( &self, params: &SetCustomEmojiStickerSetThumbnailParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setCustomEmojiStickerSetThumbnail
method.
See https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail.
Sourcefn delete_sticker_set(
&self,
params: &DeleteStickerSetParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_sticker_set( &self, params: &DeleteStickerSetParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteStickerSet
method.
Sourcefn get_available_gifts(&self) -> Result<MethodResponse<Gifts>, Self::Error>
fn get_available_gifts(&self) -> Result<MethodResponse<Gifts>, Self::Error>
Call the getAvailableGifts
method.
Sourcefn send_gift(
&self,
params: &SendGiftParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn send_gift( &self, params: &SendGiftParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the sendGift
method.
Call the giftPremiumSubscription
method.
See https://core.telegram.org/bots/api#giftpremiumsubscription.
Sourcefn verify_user(
&self,
params: &VerifyUserParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn verify_user( &self, params: &VerifyUserParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the verifyUser
method.
Sourcefn verify_chat(
&self,
params: &VerifyChatParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn verify_chat( &self, params: &VerifyChatParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the verifyChat
method.
Sourcefn remove_user_verification(
&self,
params: &RemoveUserVerificationParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn remove_user_verification( &self, params: &RemoveUserVerificationParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the removeUserVerification
method.
See https://core.telegram.org/bots/api#removeuserverification.
Sourcefn remove_chat_verification(
&self,
params: &RemoveChatVerificationParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn remove_chat_verification( &self, params: &RemoveChatVerificationParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the removeChatVerification
method.
See https://core.telegram.org/bots/api#removechatverification.
Sourcefn read_business_message(
&self,
params: &ReadBusinessMessageParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn read_business_message( &self, params: &ReadBusinessMessageParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the readBusinessMessage
method.
Sourcefn delete_business_messages(
&self,
params: &DeleteBusinessMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_business_messages( &self, params: &DeleteBusinessMessagesParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteBusinessMessages
method.
See https://core.telegram.org/bots/api#deletebusinessmessages.
Sourcefn set_business_account_name(
&self,
params: &SetBusinessAccountNameParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_business_account_name( &self, params: &SetBusinessAccountNameParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setBusinessAccountName
method.
See https://core.telegram.org/bots/api#setbusinessaccountname.
Sourcefn set_business_account_username(
&self,
params: &SetBusinessAccountUsernameParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_business_account_username( &self, params: &SetBusinessAccountUsernameParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setBusinessAccountUsername
method.
See https://core.telegram.org/bots/api#setbusinessaccountusername.
Sourcefn set_business_account_bio(
&self,
params: &SetBusinessAccountBioParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_business_account_bio( &self, params: &SetBusinessAccountBioParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setBusinessAccountBio
method.
See https://core.telegram.org/bots/api#setbusinessaccountbio.
fn set_business_account_profile_photo( &self, params: &SetBusinessAccountProfilePhotoParams, ) -> Result<MethodResponse<bool>, Self::Error>
Sourcefn remove_business_account_profile_photo(
&self,
params: &RemoveBusinessAccountProfilePhotoParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn remove_business_account_profile_photo( &self, params: &RemoveBusinessAccountProfilePhotoParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the removeBusinessAccountProfilePhoto
method.
See https://core.telegram.org/bots/api#removebusinessaccountprofilephoto.
Sourcefn set_business_account_gift_settings(
&self,
params: &SetBusinessAccountGiftSettingsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_business_account_gift_settings( &self, params: &SetBusinessAccountGiftSettingsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setBusinessAccountGiftSettings
method.
See https://core.telegram.org/bots/api#setbusinessaccountgiftsettings.
Sourcefn get_business_account_star_balance(
&self,
params: &GetBusinessAccountStarBalanceParams,
) -> Result<MethodResponse<StarAmount>, Self::Error>
fn get_business_account_star_balance( &self, params: &GetBusinessAccountStarBalanceParams, ) -> Result<MethodResponse<StarAmount>, Self::Error>
Call the getBusinessAccountStarBalance
method.
See https://core.telegram.org/bots/api#getbusinessaccountstarbalance.
Sourcefn transfer_business_account_stars(
&self,
params: &TransferBusinessAccountStarsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn transfer_business_account_stars( &self, params: &TransferBusinessAccountStarsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the transferBusinessAccountStars
method.
See https://core.telegram.org/bots/api#transferbusinessaccountstars.
Sourcefn get_business_account_gifts(
&self,
params: &GetBusinessAccountGiftsParams,
) -> Result<MethodResponse<OwnedGifts>, Self::Error>
fn get_business_account_gifts( &self, params: &GetBusinessAccountGiftsParams, ) -> Result<MethodResponse<OwnedGifts>, Self::Error>
Call the getBusinessAccountGifts
method.
See https://core.telegram.org/bots/api#getbusinessaccountgifts.
Sourcefn convert_gift_to_stars(
&self,
params: &ConvertGiftToStarsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn convert_gift_to_stars( &self, params: &ConvertGiftToStarsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the convertGiftToStars
method.
Sourcefn upgrade_gift(
&self,
params: &UpgradeGiftParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn upgrade_gift( &self, params: &UpgradeGiftParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the upgradeGift
method.
Sourcefn transfer_gift(
&self,
params: &TransferGiftParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn transfer_gift( &self, params: &TransferGiftParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the transferGift
method.
fn post_story( &self, params: &PostStoryParams, ) -> Result<MethodResponse<Story>, Self::Error>
fn edit_story( &self, params: &EditStoryParams, ) -> Result<MethodResponse<Story>, Self::Error>
Sourcefn delete_story(
&self,
params: &DeleteStoryParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn delete_story( &self, params: &DeleteStoryParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the deleteStory
method.
Sourcefn send_invoice(
&self,
params: &SendInvoiceParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_invoice( &self, params: &SendInvoiceParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendInvoice
method.
Sourcefn create_invoice_link(
&self,
params: &CreateInvoiceLinkParams,
) -> Result<MethodResponse<String>, Self::Error>
fn create_invoice_link( &self, params: &CreateInvoiceLinkParams, ) -> Result<MethodResponse<String>, Self::Error>
Call the createInvoiceLink
method.
Sourcefn answer_shipping_query(
&self,
params: &AnswerShippingQueryParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn answer_shipping_query( &self, params: &AnswerShippingQueryParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the answerShippingQuery
method.
Sourcefn answer_pre_checkout_query(
&self,
params: &AnswerPreCheckoutQueryParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn answer_pre_checkout_query( &self, params: &AnswerPreCheckoutQueryParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the answerPreCheckoutQuery
method.
See https://core.telegram.org/bots/api#answerprecheckoutquery.
Sourcefn get_my_star_balance(&self) -> Result<MethodResponse<u32>, Self::Error>
fn get_my_star_balance(&self) -> Result<MethodResponse<u32>, Self::Error>
Call the getMyStarBalance
method.
Sourcefn get_star_transactions(
&self,
params: &GetStarTransactionsParams,
) -> Result<MethodResponse<StarTransactions>, Self::Error>
fn get_star_transactions( &self, params: &GetStarTransactionsParams, ) -> Result<MethodResponse<StarTransactions>, Self::Error>
Call the getStarTransactions
method.
Sourcefn refund_star_payment(
&self,
params: &RefundStarPaymentParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn refund_star_payment( &self, params: &RefundStarPaymentParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the refundStarPayment
method.
Sourcefn edit_user_star_subscription(
&self,
params: &EditUserStarSubscriptionParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn edit_user_star_subscription( &self, params: &EditUserStarSubscriptionParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the editUserStarSubscription
method.
See https://core.telegram.org/bots/api#edituserstarsubscription.
Sourcefn send_game(
&self,
params: &SendGameParams,
) -> Result<MethodResponse<Message>, Self::Error>
fn send_game( &self, params: &SendGameParams, ) -> Result<MethodResponse<Message>, Self::Error>
Call the sendGame
method.
Sourcefn set_game_score(
&self,
params: &SetGameScoreParams,
) -> Result<MethodResponse<MessageOrBool>, Self::Error>
fn set_game_score( &self, params: &SetGameScoreParams, ) -> Result<MethodResponse<MessageOrBool>, Self::Error>
Call the setGameScore
method.
Sourcefn get_game_high_scores(
&self,
params: &GetGameHighScoresParams,
) -> Result<MethodResponse<Vec<GameHighScore>>, Self::Error>
fn get_game_high_scores( &self, params: &GetGameHighScoresParams, ) -> Result<MethodResponse<Vec<GameHighScore>>, Self::Error>
Call the getGameHighScores
method.
Sourcefn set_my_default_administrator_rights(
&self,
params: &SetMyDefaultAdministratorRightsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_my_default_administrator_rights( &self, params: &SetMyDefaultAdministratorRightsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setMyDefaultAdministratorRights
method.
See https://core.telegram.org/bots/api#setmydefaultadministratorrights.
Sourcefn get_my_default_administrator_rights(
&self,
params: &GetMyDefaultAdministratorRightsParams,
) -> Result<MethodResponse<ChatAdministratorRights>, Self::Error>
fn get_my_default_administrator_rights( &self, params: &GetMyDefaultAdministratorRightsParams, ) -> Result<MethodResponse<ChatAdministratorRights>, Self::Error>
Call the getMyDefaultAdministratorRights
method.
See https://core.telegram.org/bots/api#getmydefaultadministratorrights.
Sourcefn answer_web_app_query(
&self,
params: &AnswerWebAppQueryParams,
) -> Result<MethodResponse<SentWebAppMessage>, Self::Error>
fn answer_web_app_query( &self, params: &AnswerWebAppQueryParams, ) -> Result<MethodResponse<SentWebAppMessage>, Self::Error>
Call the answerWebAppQuery
method.
Sourcefn save_prepared_inline_message(
&self,
params: &SavePreparedInlineMessageParams,
) -> Result<MethodResponse<PreparedInlineMessage>, Self::Error>
fn save_prepared_inline_message( &self, params: &SavePreparedInlineMessageParams, ) -> Result<MethodResponse<PreparedInlineMessage>, Self::Error>
Call the savePreparedInlineMessage
method.
See https://core.telegram.org/bots/api#savepreparedinlinemessage.
Call the setChatMenuButton
method.
Call the getChatMenuButton
method.
Sourcefn unpin_all_general_forum_topic_messages(
&self,
params: &UnpinAllGeneralForumTopicMessagesParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn unpin_all_general_forum_topic_messages( &self, params: &UnpinAllGeneralForumTopicMessagesParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the unpinAllGeneralForumTopicMessages
method.
See https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages.
Sourcefn set_passport_data_errors(
&self,
params: &SetPassportDataErrorsParams,
) -> Result<MethodResponse<bool>, Self::Error>
fn set_passport_data_errors( &self, params: &SetPassportDataErrorsParams, ) -> Result<MethodResponse<bool>, Self::Error>
Call the setPassportDataErrors
method.
See https://core.telegram.org/bots/api#setpassportdataerrors.
fn request_with_possible_form_data<Params, Output>( &self, method_name: &str, params: Params, files: Vec<(&str, PathBuf)>, ) -> Result<Output, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.