Struct carapax::types::SetMessageReaction
source · pub struct SetMessageReaction { /* private fields */ }
Expand description
Changes the chosen reactions on a message.
Service messages can’t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message.
Implementations§
source§impl SetMessageReaction
impl SetMessageReaction
sourcepub fn new<T>(chat_id: T, message_id: i64) -> SetMessageReaction
pub fn new<T>(chat_id: T, message_id: i64) -> SetMessageReaction
Creates a new SetMessageReaction
.
§Arguments
chat_id
- Unique identifier of the target chat.message_id
- Identifier of the target message.
sourcepub fn with_is_big(self, value: bool) -> SetMessageReaction
pub fn with_is_big(self, value: bool) -> SetMessageReaction
Sets a new value for an is_big
flag.
§Arguments
value
- Whether to set the reaction with a big animation.
sourcepub fn with_reaction<T>(self, value: T) -> SetMessageReactionwhere
T: IntoIterator<Item = ReactionType>,
pub fn with_reaction<T>(self, value: T) -> SetMessageReactionwhere
T: IntoIterator<Item = ReactionType>,
Sets a new list of reaction types.
§Arguments
value
- New list of reaction types to set on the message.
Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
Trait Implementations§
source§impl Clone for SetMessageReaction
impl Clone for SetMessageReaction
source§fn clone(&self) -> SetMessageReaction
fn clone(&self) -> SetMessageReaction
Returns a copy 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 Debug for SetMessageReaction
impl Debug for SetMessageReaction
source§impl Method for SetMessageReaction
impl Method for SetMessageReaction
source§impl Serialize for SetMessageReaction
impl Serialize for SetMessageReaction
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SetMessageReaction
impl RefUnwindSafe for SetMessageReaction
impl Send for SetMessageReaction
impl Sync for SetMessageReaction
impl Unpin for SetMessageReaction
impl UnwindSafe for SetMessageReaction
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more