Struct discord_flows::model::Webhook
source · pub struct Webhook {
pub id: WebhookId,
pub kind: WebhookType,
pub avatar: Option<String>,
pub channel_id: Option<ChannelId>,
pub guild_id: Option<GuildId>,
pub name: Option<String>,
pub token: Option<String>,
pub user: Option<User>,
}
Expand description
A representation of a webhook, which is a low-effort way to post messages to channels. They do not necessarily require a bot user or authentication to use.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: WebhookId
The unique Id.
Can be used to calculate the creation date of the webhook.
kind: WebhookType
The type of the webhook.
avatar: Option<String>
The default avatar.
This can be modified via [ExecuteWebhook::avatar_url
].
channel_id: Option<ChannelId>
The Id of the channel that owns the webhook.
guild_id: Option<GuildId>
The Id of the guild that owns the webhook.
name: Option<String>
The default name of the webhook.
This can be modified via [ExecuteWebhook::username
].
token: Option<String>
The webhook’s secure token.
user: Option<User>
The user that created the webhook.
Note: This is not received when getting a webhook by its token.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Webhook
impl<'de> Deserialize<'de> for Webhook
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Webhook, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Webhook, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Webhook
impl Serialize for Webhook
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 RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnwindSafe for Webhook
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