pub trait Message: Message {
Show 71 methods
fn copy_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_> { ... }
fn copy_here_in_reply(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_> { ... }
fn create_chat_invite_link(&self) -> CreateChatInviteLink<'_> { ... }
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_chat_invite_link(
&self,
link: impl Into<String>
) -> EditChatInviteLink<'_> { ... }
fn edit_message_caption(
&self,
message_id: Id,
caption: impl Into<Text>
) -> EditMessageCaption<'_> { ... }
fn edit_message_location(
&self,
message_id: Id,
location: (f64, f64)
) -> EditMessageLocation<'_> { ... }
fn edit_message_media(
&self,
message_id: Id,
media: impl Into<EditableMedia>
) -> EditMessageMedia<'_> { ... }
fn edit_message_reply_markup(
&self,
message_id: Id,
reply_markup: Keyboard
) -> EditMessageReplyMarkup<'_> { ... }
fn edit_message_text(
&self,
message_id: Id,
text: impl Into<Text>
) -> EditMessageText<'_> { ... }
fn export_chat_invite_link(&self) -> ExportChatInviteLink<'_> { ... }
fn forward_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> ForwardMessage<'_> { ... }
fn get_chat(&self) -> GetChat<'_> { ... }
fn get_chat_administrators(&self) -> GetChatAdministrators<'_> { ... }
fn get_chat_member(&self, user_id: Id) -> GetChatMember<'_> { ... }
fn get_chat_member_count(&self) -> GetChatMemberCount<'_> { ... }
fn get_message_game_high_scores(
&self,
message_id: Id,
user_id: Id
) -> GetMessageGameHighScores<'_> { ... }
fn ban_chat_member(&self, user_id: Id) -> BanChatMember<'_> { ... }
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 revoke_chat_invite_link(
&self,
link: impl Into<String>
) -> RevokeChatInviteLink<'_> { ... }
fn send_animation(&self, animation: Animation) -> SendAnimation<'_> { ... }
fn send_animation_in_reply(&self, animation: Animation) -> SendAnimation<'_> { ... }
fn send_audio(&self, audio: Audio) -> SendAudio<'_> { ... }
fn send_audio_in_reply(&self, audio: Audio) -> SendAudio<'_> { ... }
fn send_chat_action(&self, action: Action) -> SendChatAction<'_> { ... }
fn send_contact(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_> { ... }
fn send_contact_in_reply(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_> { ... }
fn send_game(&self, game_short_name: impl Into<String>) -> SendGame<'_> { ... }
fn send_game_in_reply(
&self,
game_short_name: impl Into<String>
) -> SendGame<'_> { ... }
fn send_dice(&self) -> SendDice<'_> { ... }
fn send_dice_in_reply(&self) -> SendDice<'_> { ... }
fn send_document(&self, document: Document) -> SendDocument<'_> { ... }
fn send_document_in_reply(&self, document: Document) -> SendDocument<'_> { ... }
fn send_invoice(&self, invoice: Invoice) -> SendInvoice<'_> { ... }
fn send_invoice_in_reply(&self, invoice: Invoice) -> SendInvoice<'_> { ... }
fn send_location(&self, location: (f64, f64)) -> SendLocation<'_> { ... }
fn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_> { ... }
fn send_media_group(
&self,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_> { ... }
fn send_media_group_in_reply(
&self,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_> { ... }
fn send_message(&self, text: impl Into<Text>) -> SendMessage<'_> { ... }
fn send_message_in_reply(&self, text: impl Into<Text>) -> SendMessage<'_> { ... }
fn send_photo(&self, photo: Photo) -> SendPhoto<'_> { ... }
fn send_photo_in_reply(&self, photo: Photo) -> SendPhoto<'_> { ... }
fn send_poll(&self, poll: Any) -> SendPoll<'_> { ... }
fn send_poll_in_reply(&self, poll: Any) -> SendPoll<'_> { ... }
fn send_sticker(&self, sticker: Sticker) -> SendSticker<'_> { ... }
fn send_sticker_in_reply(&self, sticker: Sticker) -> SendSticker<'_> { ... }
fn send_venue(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_> { ... }
fn send_venue_in_reply(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_> { ... }
fn send_video(&self, video: Video) -> SendVideo<'_> { ... }
fn send_video_in_reply(&self, video: Video) -> SendVideo<'_> { ... }
fn send_video_note(&self, video_note: VideoNote) -> SendVideoNote<'_> { ... }
fn send_video_note_in_reply(
&self,
video_note: VideoNote
) -> SendVideoNote<'_> { ... }
fn send_voice(&self, voice: Voice) -> SendVoice<'_> { ... }
fn send_voice_in_reply(&self, voice: Voice) -> SendVoice<'_> { ... }
fn set_chat_administrator_custom_title(
&self,
user_id: Id,
custom_title: impl Into<String>
) -> SetChatAdministratorCustomTitle<'_> { ... }
fn set_chat_description(
&self,
description: impl Into<String>
) -> SetChatDescription<'_> { ... }
fn set_chat_permissions(
&self,
permissions: Permissions
) -> SetChatPermissions<'_> { ... }
fn set_chat_photo(&self, photo: ChatPhoto) -> SetChatPhoto<'_> { ... }
fn set_chat_sticker_set(
&self,
sticker_set_name: impl Into<String>
) -> SetChatStickerSet<'_> { ... }
fn set_chat_title(&self, title: impl Into<String>) -> SetChatTitle<'_> { ... }
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_all_chat_messages(&self) -> UnpinAllChatMessages<'_> { ... }
fn unpin_chat_message(&self) -> UnpinChatMessage<'_> { ... }
}
Expand description
Provides methods appliable to all messages.
Provided Methods§
sourcefn copy_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
fn copy_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
Copies a message to this chat.
sourcefn copy_here_in_reply(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
fn copy_here_in_reply(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
Copies a message in reply to this message.
sourcefn create_chat_invite_link(&self) -> CreateChatInviteLink<'_>
fn create_chat_invite_link(&self) -> CreateChatInviteLink<'_>
Creates a secondary invite link for this chat.
sourcefn delete_chat_photo(&self) -> DeleteChatPhoto<'_>
fn delete_chat_photo(&self) -> DeleteChatPhoto<'_>
Deletes the photo of this chat.
sourcefn delete_chat_sticker_set(&self) -> DeleteChatStickerSet<'_>
fn delete_chat_sticker_set(&self) -> DeleteChatStickerSet<'_>
Deletes the sticker set of this chat.
sourcefn delete_message(&self, message_id: Id) -> DeleteMessage<'_>
fn delete_message(&self, message_id: Id) -> DeleteMessage<'_>
Deletes a message in this chat.
sourcefn delete_this_message(&self) -> DeleteMessage<'_>
fn delete_this_message(&self) -> DeleteMessage<'_>
Deletes the incoming message.
sourcefn edit_chat_invite_link(
&self,
link: impl Into<String>
) -> EditChatInviteLink<'_>
fn edit_chat_invite_link(
&self,
link: impl Into<String>
) -> EditChatInviteLink<'_>
Edits a secondary invite link for this chat.
Updates the caption of a message in this group.
sourcefn edit_message_location(
&self,
message_id: Id,
location: (f64, f64)
) -> EditMessageLocation<'_>
fn edit_message_location(
&self,
message_id: Id,
location: (f64, f64)
) -> EditMessageLocation<'_>
Updates a live location in this group.
sourcefn edit_message_media(
&self,
message_id: Id,
media: impl Into<EditableMedia>
) -> EditMessageMedia<'_>
fn edit_message_media(
&self,
message_id: Id,
media: impl Into<EditableMedia>
) -> EditMessageMedia<'_>
Updates the media of a message in this group.
sourcefn edit_message_reply_markup(
&self,
message_id: Id,
reply_markup: Keyboard
) -> EditMessageReplyMarkup<'_>
fn edit_message_reply_markup(
&self,
message_id: Id,
reply_markup: Keyboard
) -> EditMessageReplyMarkup<'_>
Updates the reply markup of a message in this group.
sourcefn edit_message_text(
&self,
message_id: Id,
text: impl Into<Text>
) -> EditMessageText<'_>
fn edit_message_text(
&self,
message_id: Id,
text: impl Into<Text>
) -> EditMessageText<'_>
Updates the text of a message in this group.
sourcefn export_chat_invite_link(&self) -> ExportChatInviteLink<'_>
fn export_chat_invite_link(&self) -> ExportChatInviteLink<'_>
Exports the invite link of this chat.
sourcefn forward_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> ForwardMessage<'_>
fn forward_here(
&self,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> ForwardMessage<'_>
Forwards a message to this chat.
sourcefn get_chat_administrators(&self) -> GetChatAdministrators<'_>
fn get_chat_administrators(&self) -> GetChatAdministrators<'_>
Gets a list of admins of this chat.
sourcefn get_chat_member(&self, user_id: Id) -> GetChatMember<'_>
fn get_chat_member(&self, user_id: Id) -> GetChatMember<'_>
Gets information about a member of this chat.
sourcefn get_chat_member_count(&self) -> GetChatMemberCount<'_>
fn get_chat_member_count(&self) -> GetChatMemberCount<'_>
Gets the number of members in this chat.
sourcefn get_message_game_high_scores(
&self,
message_id: Id,
user_id: Id
) -> GetMessageGameHighScores<'_>
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.
sourcefn ban_chat_member(&self, user_id: Id) -> BanChatMember<'_>
fn ban_chat_member(&self, user_id: Id) -> BanChatMember<'_>
Bans a member of this chat.
sourcefn leave_chat(&self) -> LeaveChat<'_>
fn leave_chat(&self) -> LeaveChat<'_>
Leaves this chat.
sourcefn pin_chat_message(&self, message_id: Id) -> PinChatMessage<'_>
fn pin_chat_message(&self, message_id: Id) -> PinChatMessage<'_>
Pins a message in this chat.
sourcefn promote_chat_member(&self, user_id: Id) -> PromoteChatMember<'_>
fn promote_chat_member(&self, user_id: Id) -> PromoteChatMember<'_>
Promotes a member of this chat.
sourcefn restrict_chat_member(
&self,
user_id: Id,
permissions: Permissions
) -> RestrictChatMember<'_>
fn restrict_chat_member(
&self,
user_id: Id,
permissions: Permissions
) -> RestrictChatMember<'_>
Restricts a member of this chat.
sourcefn revoke_chat_invite_link(
&self,
link: impl Into<String>
) -> RevokeChatInviteLink<'_>
fn revoke_chat_invite_link(
&self,
link: impl Into<String>
) -> RevokeChatInviteLink<'_>
Revokes an invite link for this chat.
sourcefn send_animation(&self, animation: Animation) -> SendAnimation<'_>
fn send_animation(&self, animation: Animation) -> SendAnimation<'_>
Send an animation to this chat.
sourcefn send_animation_in_reply(&self, animation: Animation) -> SendAnimation<'_>
fn send_animation_in_reply(&self, animation: Animation) -> SendAnimation<'_>
Sends an animation in reply to this message.
sourcefn send_audio(&self, audio: Audio) -> SendAudio<'_>
fn send_audio(&self, audio: Audio) -> SendAudio<'_>
Sends an audio to this chat.
sourcefn send_audio_in_reply(&self, audio: Audio) -> SendAudio<'_>
fn send_audio_in_reply(&self, audio: Audio) -> SendAudio<'_>
Sends an audio in reply to this message.
sourcefn send_chat_action(&self, action: Action) -> SendChatAction<'_>
fn send_chat_action(&self, action: Action) -> SendChatAction<'_>
Sends an action to this group.
sourcefn send_contact(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
fn send_contact(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
Sends a contact to this group.
sourcefn send_contact_in_reply(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
fn send_contact_in_reply(
&self,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
Sends a contact in reply to this message.
sourcefn send_game(&self, game_short_name: impl Into<String>) -> SendGame<'_>
fn send_game(&self, game_short_name: impl Into<String>) -> SendGame<'_>
Sends a game to this chat.
sourcefn send_game_in_reply(&self, game_short_name: impl Into<String>) -> SendGame<'_>
fn send_game_in_reply(&self, game_short_name: impl Into<String>) -> SendGame<'_>
Sends a game in reply to this message.
sourcefn send_dice_in_reply(&self) -> SendDice<'_>
fn send_dice_in_reply(&self) -> SendDice<'_>
Sends a dice in reply to this message.
sourcefn send_document(&self, document: Document) -> SendDocument<'_>
fn send_document(&self, document: Document) -> SendDocument<'_>
Sends a document to this chat.
sourcefn send_document_in_reply(&self, document: Document) -> SendDocument<'_>
fn send_document_in_reply(&self, document: Document) -> SendDocument<'_>
Sends a document in reply to this message.
sourcefn send_invoice(&self, invoice: Invoice) -> SendInvoice<'_>
fn send_invoice(&self, invoice: Invoice) -> SendInvoice<'_>
Sends an invoice to this chat.
sourcefn send_invoice_in_reply(&self, invoice: Invoice) -> SendInvoice<'_>
fn send_invoice_in_reply(&self, invoice: Invoice) -> SendInvoice<'_>
Sends an invoice in reply to this message.
sourcefn send_location(&self, location: (f64, f64)) -> SendLocation<'_>
fn send_location(&self, location: (f64, f64)) -> SendLocation<'_>
Sends a location to this chat.
sourcefn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_>
fn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_>
Sends a location in reply to this message.
sourcefn send_media_group(&self, media: impl Into<MediaGroup>) -> SendMediaGroup<'_>
fn send_media_group(&self, media: impl Into<MediaGroup>) -> SendMediaGroup<'_>
Sends an album to this chat.
sourcefn send_media_group_in_reply(
&self,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_>
fn send_media_group_in_reply(
&self,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_>
Sends an album in reply to this message.
sourcefn send_message(&self, text: impl Into<Text>) -> SendMessage<'_>
fn send_message(&self, text: impl Into<Text>) -> SendMessage<'_>
Sends a message to this chat.
sourcefn send_message_in_reply(&self, text: impl Into<Text>) -> SendMessage<'_>
fn send_message_in_reply(&self, text: impl Into<Text>) -> SendMessage<'_>
Sends a message in reply to this message.
sourcefn send_photo(&self, photo: Photo) -> SendPhoto<'_>
fn send_photo(&self, photo: Photo) -> SendPhoto<'_>
Sends a photo to this chat.
sourcefn send_photo_in_reply(&self, photo: Photo) -> SendPhoto<'_>
fn send_photo_in_reply(&self, photo: Photo) -> SendPhoto<'_>
Sends a photo in reply to this message.
sourcefn send_poll_in_reply(&self, poll: Any) -> SendPoll<'_>
fn send_poll_in_reply(&self, poll: Any) -> SendPoll<'_>
Sends a poll in reply to this message.
sourcefn send_sticker(&self, sticker: Sticker) -> SendSticker<'_>
fn send_sticker(&self, sticker: Sticker) -> SendSticker<'_>
Sends a sticker to this chat.
sourcefn send_sticker_in_reply(&self, sticker: Sticker) -> SendSticker<'_>
fn send_sticker_in_reply(&self, sticker: Sticker) -> SendSticker<'_>
Sends a sticker in reply to this message.
sourcefn send_venue(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
fn send_venue(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
Sends a venue to this chat.
sourcefn send_venue_in_reply(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
fn send_venue_in_reply(
&self,
location: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
Sends a venue in reply to this message.
sourcefn send_video(&self, video: Video) -> SendVideo<'_>
fn send_video(&self, video: Video) -> SendVideo<'_>
Sends a video to this chat.
sourcefn send_video_in_reply(&self, video: Video) -> SendVideo<'_>
fn send_video_in_reply(&self, video: Video) -> SendVideo<'_>
Sends a video in reply to this message.
sourcefn send_video_note(&self, video_note: VideoNote) -> SendVideoNote<'_>
fn send_video_note(&self, video_note: VideoNote) -> SendVideoNote<'_>
Sends a video note to this chat.
sourcefn send_video_note_in_reply(&self, video_note: VideoNote) -> SendVideoNote<'_>
fn send_video_note_in_reply(&self, video_note: VideoNote) -> SendVideoNote<'_>
Sends a video note in reply to this message.
sourcefn send_voice(&self, voice: Voice) -> SendVoice<'_>
fn send_voice(&self, voice: Voice) -> SendVoice<'_>
Sends a voice to this chat.
sourcefn send_voice_in_reply(&self, voice: Voice) -> SendVoice<'_>
fn send_voice_in_reply(&self, voice: Voice) -> SendVoice<'_>
Sends a voice in reply to this message.
sourcefn set_chat_administrator_custom_title(
&self,
user_id: Id,
custom_title: impl Into<String>
) -> SetChatAdministratorCustomTitle<'_>
fn set_chat_administrator_custom_title(
&self,
user_id: Id,
custom_title: impl Into<String>
) -> SetChatAdministratorCustomTitle<'_>
Sets a custom title for an admin in this chat.
sourcefn set_chat_description(
&self,
description: impl Into<String>
) -> SetChatDescription<'_>
fn set_chat_description(
&self,
description: impl Into<String>
) -> SetChatDescription<'_>
Sets a new description of this chat.
sourcefn set_chat_permissions(
&self,
permissions: Permissions
) -> SetChatPermissions<'_>
fn set_chat_permissions(
&self,
permissions: Permissions
) -> SetChatPermissions<'_>
Sets new permissions of this chat.
sourcefn set_chat_photo(&self, photo: ChatPhoto) -> SetChatPhoto<'_>
fn set_chat_photo(&self, photo: ChatPhoto) -> SetChatPhoto<'_>
Sets a new photo of this chat.
sourcefn set_chat_sticker_set(
&self,
sticker_set_name: impl Into<String>
) -> SetChatStickerSet<'_>
fn set_chat_sticker_set(
&self,
sticker_set_name: impl Into<String>
) -> SetChatStickerSet<'_>
Sets a new sticker set of this chat.
sourcefn set_chat_title(&self, title: impl Into<String>) -> SetChatTitle<'_>
fn set_chat_title(&self, title: impl Into<String>) -> SetChatTitle<'_>
Sets a new chat title of this chat.
sourcefn set_message_game_score(
&self,
message_id: Id,
user_id: Id,
score: u32
) -> SetMessageGameScore<'_>
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.
sourcefn unban_chat_member(&self, user_id: Id) -> UnbanChatMember<'_>
fn unban_chat_member(&self, user_id: Id) -> UnbanChatMember<'_>
Unbans a member of this chat.
sourcefn unpin_all_chat_messages(&self) -> UnpinAllChatMessages<'_>
fn unpin_all_chat_messages(&self) -> UnpinAllChatMessages<'_>
Unpins all messages in this chat.
sourcefn unpin_chat_message(&self) -> UnpinChatMessage<'_>
fn unpin_chat_message(&self) -> UnpinChatMessage<'_>
Unpins the pinned message in this chat.