pub struct DeleteMessage {
pub chat_id: ChatId,
pub message_id: i64,
}Expand description
Use this method to delete a message, including service messages, with the following limitations:
- A message can only be deleted if it was sent less than 48 hours ago.
- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
- Bots can delete outgoing messages in private chats, groups, and supergroups.
- Bots can delete incoming messages in private chats.
- Bots granted can_post_messages permissions can delete outgoing messages in channels.
- If the bot is an administrator of a group, it can delete any message there.
- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there. Returns True on success.
Fields§
§chat_id: ChatIdUnique identifier for the target chat or username of the target channel (in the format @channelusername)
message_id: i64Identifier of the message to delete
Implementations§
Trait Implementations§
Source§impl Clone for DeleteMessage
impl Clone for DeleteMessage
Source§fn clone(&self) -> DeleteMessage
fn clone(&self) -> DeleteMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Serialize for DeleteMessage
impl Serialize for DeleteMessage
Source§impl TelegramMethod for DeleteMessage
impl TelegramMethod for DeleteMessage
impl JsonMethod for DeleteMessage
Auto Trait Implementations§
impl Freeze for DeleteMessage
impl RefUnwindSafe for DeleteMessage
impl Send for DeleteMessage
impl Sync for DeleteMessage
impl Unpin for DeleteMessage
impl UnwindSafe for DeleteMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more