pub struct Webhook {
pub id: Snowflake,
pub guild_id: Option<String>,
pub channel_id: Snowflake,
pub user: Option<User>,
pub name: Option<String>,
pub avatar: Option<String>,
pub token: String,
}
Expand description
A simple solution to post messages in Discord channels from external sources.
Fields§
§id: Snowflake
The webhook ID of this webhook.
guild_id: Option<String>
The guild ID of the guild which the webhook belongs to.
channel_id: Snowflake
The channel ID of the channel which the webhook belongs to.
user: Option<User>
The user who created this webhook.
name: Option<String>
The default name of this webhook.
avatar: Option<String>
The default avatar hash of this webhook.
token: String
The secure token of this webhook.
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 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