Struct EditMessage
zaun_client::EditMessage · Struct
pub struct EditMessage { … }An edit of one of this member’s messages. A plain &str replaces the text and leaves the
embeds and mentions as they are.
An edit uploads nothing: an embed’s pictures must be attachments the message already has
(Picture::Attachment, or an Attachment of it).
Methods
Section titled “Methods”mention_member
Section titled “mention_member”pub fn mention_member(self, member: MemberId) -> SelfNotifies member, as MessageOptions::mention_member.
Any mention on an edit replaces all of the message’s mentions, and needs
SEND_MESSAGES.
mention_role
Section titled “mention_role”pub fn mention_role(self, role: RoleId) -> SelfNotifies the members with role, as
MessageOptions::mention_role.
mention_everyone
Section titled “mention_everyone”pub fn mention_everyone(self) -> SelfNotifies everyone who can see the channel (needs MENTION_EVERYONE; dropped without).
mentions
Section titled “mentions”pub fn mentions(self, mentions: Mentions) -> SelfReplaces the message’s mentions with exactly mentions; Mentions::default clears
them, @everyone too.
mentions_from_content
Section titled “mentions_from_content”pub const fn mentions_from_content(self) -> SelfAlso notifies whoever the text shows (see mention::parse): the new text, or the
message’s own when the edit keeps it. The edit then always sends mentions, so text
that shows none clears them. Only for text this member wrote.
pub fn new() -> SelfAn edit that changes nothing yet: the text stays (a Message knows
it; a PartialMessage needs content), and
so do the embeds.
content
Section titled “content”pub fn content<impl Into<String>>(self, content: impl Into<String>) -> SelfThe new text.
pub fn embed<impl Into<EmbedBuilder>>(self, embed: impl Into<EmbedBuilder>) -> SelfReplaces the embeds with these, starting with this one.
embeds
Section titled “embeds”pub fn embeds<impl Into<EmbedBuilder>, impl IntoIterator<Item = impl Into<EmbedBuilder>>>(self, embeds: impl IntoIterator<Item = impl Into<EmbedBuilder>>) -> SelfReplaces the embeds with embeds (none removes them all).
clear_embeds
Section titled “clear_embeds”pub fn clear_embeds(self) -> SelfRemoves every embed.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Default, Eq, From<&String>, From<&str>, From<EmbedBuilder>, From<String>, PartialEq, StructuralPartialEq