Skip to main content

ChatMethods

Trait ChatMethods 

Source
pub trait ChatMethods: Message {
Show 65 methods // Provided methods fn delete_chat_photo(&self) -> DeleteChatPhoto<'_> { ... } fn delete_chat_sticker_set(&self) -> DeleteChatStickerSet<'_> { ... } fn delete_message(&self, message_id: Id) -> DeleteMessage<'_> { ... } fn delete_this_message(&self) -> DeleteMessage<'_> { ... } fn edit_message_caption<'a>( &'a self, message_id: Id, caption: impl Into<Text<'a>>, ) -> EditMessageCaption<'a> { ... } fn edit_message_location( &self, message_id: Id, location: (f64, f64), ) -> EditMessageLocation<'_> { ... } fn edit_message_media<'a>( &'a self, message_id: Id, media: impl Into<EditableMedia<'a>>, ) -> EditMessageMedia<'a> { ... } fn edit_message_reply_markup<'a>( &'a self, message_id: Id, reply_markup: Keyboard<'a>, ) -> EditMessageReplyMarkup<'a> { ... } fn edit_message_text<'a>( &'a self, message_id: Id, text: impl Into<Text<'a>>, ) -> EditMessageText<'a> { ... } fn export_chat_invite_link(&self) -> ExportChatInviteLink<'_> { ... } fn forward_here<'a>( &'a self, from_chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> ForwardMessage<'a> { ... } fn get_chat(&self) -> GetChat<'_> { ... } fn get_chat_administrators(&self) -> GetChatAdministrators<'_> { ... } fn get_chat_member(&self, user_id: Id) -> GetChatMember<'_> { ... } fn get_chat_members_count(&self) -> GetChatMembersCount<'_> { ... } fn get_message_game_high_scores( &self, message_id: Id, user_id: Id, ) -> GetMessageGameHighScores<'_> { ... } fn kick_chat_member(&self, user_id: Id) -> KickChatMember<'_> { ... } fn leave_chat(&self) -> LeaveChat<'_> { ... } fn pin_chat_message(&self, message_id: Id) -> PinChatMessage<'_> { ... } fn promote_chat_member(&self, user_id: Id) -> PromoteChatMember<'_> { ... } fn restrict_chat_member( &self, user_id: Id, permissions: Permissions, ) -> RestrictChatMember<'_> { ... } fn send_animation<'a>( &'a self, animation: Animation<'a>, ) -> SendAnimation<'a> { ... } fn send_animation_in_reply<'a>( &'a self, animation: Animation<'a>, ) -> SendAnimation<'a> { ... } fn send_audio<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a> { ... } fn send_audio_in_reply<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a> { ... } fn send_chat_action(&self, action: Action) -> SendChatAction<'_> { ... } fn send_contact<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a> { ... } fn send_contact_in_reply<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a> { ... } fn send_game<'a>(&'a self, game_short_name: &'a str) -> SendGame<'a> { ... } fn send_game_in_reply<'a>( &'a self, game_short_name: &'a str, ) -> SendGame<'a> { ... } fn send_dice(&self) -> SendDice<'_> { ... } fn send_dice_in_reply(&self) -> SendDice<'_> { ... } fn send_document<'a>(&'a self, document: Document<'a>) -> SendDocument<'a> { ... } fn send_document_in_reply<'a>( &'a self, document: Document<'a>, ) -> SendDocument<'a> { ... } fn send_invoice<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a> { ... } fn send_invoice_in_reply<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a> { ... } fn send_location(&self, location: (f64, f64)) -> SendLocation<'_> { ... } fn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_> { ... } fn send_media_group<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a> { ... } fn send_media_group_in_reply<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a> { ... } fn send_message<'a>(&'a self, text: impl Into<Text<'a>>) -> SendMessage<'a> { ... } fn send_message_in_reply<'a>( &'a self, text: impl Into<Text<'a>>, ) -> SendMessage<'a> { ... } fn send_photo<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a> { ... } fn send_photo_in_reply<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a> { ... } fn send_poll<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a> { ... } fn send_poll_in_reply<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a> { ... } fn send_sticker<'a>(&'a self, sticker: Sticker<'a>) -> SendSticker<'a> { ... } fn send_sticker_in_reply<'a>( &'a self, sticker: Sticker<'a>, ) -> SendSticker<'a> { ... } fn send_venue<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a> { ... } fn send_venue_in_reply<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a> { ... } fn send_video<'a>(&'a self, video: Video<'a>) -> SendVideo<'a> { ... } fn send_video_in_reply<'a>(&'a self, video: Video<'a>) -> SendVideo<'a> { ... } fn send_video_note<'a>( &'a self, video_note: VideoNote<'a>, ) -> SendVideoNote<'a> { ... } fn send_video_note_in_reply<'a>( &'a self, video_note: VideoNote<'a>, ) -> SendVideoNote<'a> { ... } fn send_voice<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a> { ... } fn send_voice_in_reply<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a> { ... } fn set_chat_administrator_custom_title<'a>( &'a self, user_id: Id, custom_title: &'a str, ) -> SetChatAdministratorCustomTitle<'a> { ... } fn set_chat_description<'a>( &'a self, description: &'a str, ) -> SetChatDescription<'a> { ... } fn set_chat_permissions( &self, permissions: Permissions, ) -> SetChatPermissions<'_> { ... } fn set_chat_photo<'a>(&'a self, photo: ChatPhoto<'a>) -> SetChatPhoto<'a> { ... } fn set_chat_sticker_set<'a>( &'a self, sticker_set_name: &'a str, ) -> SetChatStickerSet<'a> { ... } fn set_chat_title<'a>(&'a self, title: &'a str) -> SetChatTitle<'a> { ... } fn set_message_game_score( &self, message_id: Id, user_id: Id, score: u32, ) -> SetMessageGameScore<'_> { ... } fn unban_chat_member(&self, user_id: Id) -> UnbanChatMember<'_> { ... } fn unpin_chat_message(&self) -> UnpinChatMessage<'_> { ... }
}
Expand description

Provides methods appliable to all messages.

Provided Methods§

Source

fn delete_chat_photo(&self) -> DeleteChatPhoto<'_>

Deletes the photo of this chat.

Source

fn delete_chat_sticker_set(&self) -> DeleteChatStickerSet<'_>

Deletes the sticker set of this chat.

Source

fn delete_message(&self, message_id: Id) -> DeleteMessage<'_>

Deletes a message in this chat.

Source

fn delete_this_message(&self) -> DeleteMessage<'_>

Deletes the incoming message.

Source

fn edit_message_caption<'a>( &'a self, message_id: Id, caption: impl Into<Text<'a>>, ) -> EditMessageCaption<'a>

Updates the caption of a message in this group.

Source

fn edit_message_location( &self, message_id: Id, location: (f64, f64), ) -> EditMessageLocation<'_>

Updates a live location in this group.

Source

fn edit_message_media<'a>( &'a self, message_id: Id, media: impl Into<EditableMedia<'a>>, ) -> EditMessageMedia<'a>

Updates the media of a message in this group.

Source

fn edit_message_reply_markup<'a>( &'a self, message_id: Id, reply_markup: Keyboard<'a>, ) -> EditMessageReplyMarkup<'a>

Updates the reply markup of a message in this group.

Source

fn edit_message_text<'a>( &'a self, message_id: Id, text: impl Into<Text<'a>>, ) -> EditMessageText<'a>

Updates the text of a message in this group.

Exports the invite link of this chat.

Source

fn forward_here<'a>( &'a self, from_chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> ForwardMessage<'a>

Forwards a message to this chat.

Source

fn get_chat(&self) -> GetChat<'_>

Gets information about this chat.

Source

fn get_chat_administrators(&self) -> GetChatAdministrators<'_>

Gets a list of admins of this chat.

Source

fn get_chat_member(&self, user_id: Id) -> GetChatMember<'_>

Gets information about a member of this chat.

Source

fn get_chat_members_count(&self) -> GetChatMembersCount<'_>

Gets the number of members in this chat.

Source

fn get_message_game_high_scores( &self, message_id: Id, user_id: Id, ) -> GetMessageGameHighScores<'_>

Gets infomation about high scores in a game sent in this chat.

Source

fn kick_chat_member(&self, user_id: Id) -> KickChatMember<'_>

Kicks a member of this chat.

Source

fn leave_chat(&self) -> LeaveChat<'_>

Leaves this chat.

Source

fn pin_chat_message(&self, message_id: Id) -> PinChatMessage<'_>

Pins a message in this chat.

Source

fn promote_chat_member(&self, user_id: Id) -> PromoteChatMember<'_>

Promotes a member of this chat.

Source

fn restrict_chat_member( &self, user_id: Id, permissions: Permissions, ) -> RestrictChatMember<'_>

Restricts a member of this chat.

Source

fn send_animation<'a>(&'a self, animation: Animation<'a>) -> SendAnimation<'a>

Send an animation to this chat.

Source

fn send_animation_in_reply<'a>( &'a self, animation: Animation<'a>, ) -> SendAnimation<'a>

Sends an animation in reply to this message.

Source

fn send_audio<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a>

Sends an audio to this chat.

Source

fn send_audio_in_reply<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a>

Sends an audio in reply to this message.

Source

fn send_chat_action(&self, action: Action) -> SendChatAction<'_>

Sends an action to this group.

Source

fn send_contact<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a>

Sends a contact to this group.

Source

fn send_contact_in_reply<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a>

Sends a contact in reply to this message.

Source

fn send_game<'a>(&'a self, game_short_name: &'a str) -> SendGame<'a>

Sends a game to this chat.

Source

fn send_game_in_reply<'a>(&'a self, game_short_name: &'a str) -> SendGame<'a>

Sends a game in reply to this message.

Source

fn send_dice(&self) -> SendDice<'_>

Sends a dice to this chat.

Source

fn send_dice_in_reply(&self) -> SendDice<'_>

Sends a dice in reply to this message.

Source

fn send_document<'a>(&'a self, document: Document<'a>) -> SendDocument<'a>

Sends a document to this chat.

Source

fn send_document_in_reply<'a>( &'a self, document: Document<'a>, ) -> SendDocument<'a>

Sends a document in reply to this message.

Source

fn send_invoice<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a>

Sends an invoice to this chat.

Source

fn send_invoice_in_reply<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a>

Sends an invoice in reply to this message.

Source

fn send_location(&self, location: (f64, f64)) -> SendLocation<'_>

Sends a location to this chat.

Source

fn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_>

Sends a location in reply to this message.

Source

fn send_media_group<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a>

Sends an album to this chat.

Source

fn send_media_group_in_reply<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a>

Sends an album in reply to this message.

Source

fn send_message<'a>(&'a self, text: impl Into<Text<'a>>) -> SendMessage<'a>

Sends a message to this chat.

Source

fn send_message_in_reply<'a>( &'a self, text: impl Into<Text<'a>>, ) -> SendMessage<'a>

Sends a message in reply to this message.

Source

fn send_photo<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a>

Sends a photo to this chat.

Source

fn send_photo_in_reply<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a>

Sends a photo in reply to this message.

Source

fn send_poll<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a>

Sends a poll to this chat.

Source

fn send_poll_in_reply<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a>

Sends a poll in reply to this message.

Source

fn send_sticker<'a>(&'a self, sticker: Sticker<'a>) -> SendSticker<'a>

Sends a sticker to this chat.

Source

fn send_sticker_in_reply<'a>(&'a self, sticker: Sticker<'a>) -> SendSticker<'a>

Sends a sticker in reply to this message.

Source

fn send_venue<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a>

Sends a venue to this chat.

Source

fn send_venue_in_reply<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a>

Sends a venue in reply to this message.

Source

fn send_video<'a>(&'a self, video: Video<'a>) -> SendVideo<'a>

Sends a video to this chat.

Source

fn send_video_in_reply<'a>(&'a self, video: Video<'a>) -> SendVideo<'a>

Sends a video in reply to this message.

Source

fn send_video_note<'a>(&'a self, video_note: VideoNote<'a>) -> SendVideoNote<'a>

Sends a video note to this chat.

Source

fn send_video_note_in_reply<'a>( &'a self, video_note: VideoNote<'a>, ) -> SendVideoNote<'a>

Sends a video note in reply to this message.

Source

fn send_voice<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a>

Sends a voice to this chat.

Source

fn send_voice_in_reply<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a>

Sends a voice in reply to this message.

Source

fn set_chat_administrator_custom_title<'a>( &'a self, user_id: Id, custom_title: &'a str, ) -> SetChatAdministratorCustomTitle<'a>

Sets a custom title for an admin in this chat.

Source

fn set_chat_description<'a>( &'a self, description: &'a str, ) -> SetChatDescription<'a>

Sets a new description of this chat.

Source

fn set_chat_permissions( &self, permissions: Permissions, ) -> SetChatPermissions<'_>

Sets new permissions of this chat.

Source

fn set_chat_photo<'a>(&'a self, photo: ChatPhoto<'a>) -> SetChatPhoto<'a>

Sets a new photo of this chat.

Source

fn set_chat_sticker_set<'a>( &'a self, sticker_set_name: &'a str, ) -> SetChatStickerSet<'a>

Sets a new sticker set of this chat.

Source

fn set_chat_title<'a>(&'a self, title: &'a str) -> SetChatTitle<'a>

Sets a new chat title of this chat.

Source

fn set_message_game_score( &self, message_id: Id, user_id: Id, score: u32, ) -> SetMessageGameScore<'_>

Sets a new high score for a player who played a game in this chat.

Source

fn unban_chat_member(&self, user_id: Id) -> UnbanChatMember<'_>

Unbans a member of this chat.

Source

fn unpin_chat_message(&self) -> UnpinChatMessage<'_>

Unpins the pinned message in this chat.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§