Struct twilight_http::request::channel::webhook::CreateWebhook
source · pub struct CreateWebhook<'a> { /* private fields */ }
Expand description
Create a webhook in a channel.
Examples
use twilight_http::Client;
use twilight_model::id::Id;
let client = Client::new("my token".to_owned());
let channel_id = Id::new(123);
let webhook = client.create_webhook(channel_id, "Twily Bot")?.await?;
Implementations§
source§impl<'a> CreateWebhook<'a>
impl<'a> CreateWebhook<'a>
sourcepub const fn avatar(self, avatar: &'a str) -> Self
pub const fn avatar(self, avatar: &'a str) -> Self
Set the avatar of the webhook.
This must be a Data URI, in the form of
data:image/{type};base64,{data}
where {type}
is the image MIME type
and {data}
is the base64-encoded image. See Discord Docs/Image Data.
Trait Implementations§
source§impl<'a> AuditLogReason<'a> for CreateWebhook<'a>
impl<'a> AuditLogReason<'a> for CreateWebhook<'a>
source§impl IntoFuture for CreateWebhook<'_>
impl IntoFuture for CreateWebhook<'_>
§type Output = Result<Response<Webhook>, Error>
type Output = Result<Response<Webhook>, Error>
The output that the future will produce on completion.
§type IntoFuture = ResponseFuture<Webhook>
type IntoFuture = ResponseFuture<Webhook>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more