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(123);
let message_id = MessageId(456);
let emoji = RequestReactionType::Unicode { name: "🌃" };

let reaction = client
    .create_reaction(channel_id, message_id, &emoji)
    .exec()
    .await?;

Implementations

Execute the request, returning a future resolving to a Response.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.