Struct twilight_http::request::channel::reaction::CreateReaction [−][src]
pub struct CreateReaction<'a> { /* fields omitted */ }Expand description
Create a reaction in a ChannelId on a MessageId.
The reaction must be a variant of RequestReactionType.
Examples
use twilight_http::{Client, request::channel::reaction::RequestReactionType};
use twilight_model::{
id::{ChannelId, MessageId},
};
let client = Client::new("my token".to_owned());
let channel_id = ChannelId::new(123).expect("non zero");
let message_id = MessageId::new(456).expect("non zero");
let emoji = RequestReactionType::Unicode { name: "🌃" };
let reaction = client
.create_reaction(channel_id, message_id, &emoji)
.exec()
.await?;Implementations
pub fn exec(self) -> ResponseFuture<EmptyBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<EmptyBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Notable traits for ResponseFuture<T>
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;Execute the request, returning a future resolving to a Response.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for CreateReaction<'a>
impl<'a> Send for CreateReaction<'a>
impl<'a> Sync for CreateReaction<'a>
impl<'a> Unpin for CreateReaction<'a>
impl<'a> !UnwindSafe for CreateReaction<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more