Struct teloxide_core::payloads::DeleteMessage
source · pub struct DeleteMessage {
pub chat_id: Recipient,
pub message_id: MessageId,
}
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: Recipient
Unique identifier for the target chat or username of the target channel (in the format @channelusername
).
message_id: MessageId
Identifier of the message to delete
Implementations§
Trait Implementations§
source§impl Clone for DeleteMessage
impl Clone for DeleteMessage
source§impl Debug for DeleteMessage
impl Debug for DeleteMessage
source§impl Hash for DeleteMessage
impl Hash for DeleteMessage
source§impl PartialEq<DeleteMessage> for DeleteMessage
impl PartialEq<DeleteMessage> for DeleteMessage
source§fn eq(&self, other: &DeleteMessage) -> bool
fn eq(&self, other: &DeleteMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Payload for DeleteMessage
impl Payload for DeleteMessage
source§fn 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.source§impl 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§
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.