Struct teloxide_core::payloads::DeleteMessage
source · [−]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: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername).
message_id: MessageIdIdentifier of the message to delete
Implementations
Trait Implementations
sourceimpl Clone for DeleteMessage
impl Clone for DeleteMessage
sourcefn clone(&self) -> DeleteMessageⓘNotable traits for DeleteMessageimpl Payload for DeleteMessage type Output = True;
fn clone(&self) -> DeleteMessageⓘNotable traits for DeleteMessageimpl Payload for DeleteMessage type Output = True;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for DeleteMessage
impl Debug for DeleteMessage
sourceimpl Hash for DeleteMessage
impl Hash for DeleteMessage
sourceimpl PartialEq<DeleteMessage> for DeleteMessage
impl PartialEq<DeleteMessage> for DeleteMessage
sourcefn eq(&self, other: &DeleteMessage) -> bool
fn eq(&self, other: &DeleteMessage) -> bool
sourceimpl Payload for DeleteMessage
impl Payload for DeleteMessage
sourcefn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used. Read moresourceimpl Serialize for DeleteMessage
impl Serialize for DeleteMessage
impl Eq for DeleteMessage
impl StructuralEq for DeleteMessage
impl StructuralPartialEq for DeleteMessage
Auto Trait Implementations
impl RefUnwindSafe for DeleteMessage
impl Send for DeleteMessage
impl Sync for DeleteMessage
impl Unpin for DeleteMessage
impl UnwindSafe for DeleteMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.