pub struct Webhook {
pub id: Snowflake,
pub kind: u8,
pub guild_id: Option<Snowflake>,
pub channel_id: Option<Snowflake>,
pub user: Option<User>,
pub name: Option<String>,
pub avatar: Option<String>,
pub token: Option<String>,
pub application_id: Option<Snowflake>,
pub url: Option<String>,
pub source_guild: Option<WebhookSourceGuild>,
pub source_channel: Option<WebhookSourceChannel>,
}Expand description
Fields§
§id: SnowflakeThe webhook’s id
kind: u81 incoming, 2 channel follower, 3 application
guild_id: Option<Snowflake>The guild it belongs to
channel_id: Option<Snowflake>The channel it posts to
user: Option<User>Who created it (absent when fetched by token)
name: Option<String>Default name (1-80 characters)
avatar: Option<String>Default avatar hash
token: Option<String>Incoming webhooks: the secure token
application_id: Option<Snowflake>The application that created it
url: Option<String>Incoming webhooks: execution URL
source_guild: Option<WebhookSourceGuild>Channel follower webhooks: the guild of the followed channel
source_channel: Option<WebhookSourceChannel>Channel follower webhooks: the followed announcement channel
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Webhook
impl<'de> Deserialize<'de> for Webhook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Webhook
impl RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnsafeUnpin 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