Expand description
dwbhk is a Rust library for firing a Discord webhook
§Features
no-panic
Disablespanic!
in the crateblocking
Enablesreqwest
’sblocking
feature. One can use the blocking methods with theexecute_url_sync
andexecute_sync
onWebhookRequest
§Usage
Example usage:
use dwbhk::*;
let req = WebhookRequestBuilder::new()
.set_data(WebhookBuilder::new()
.set_embeds(vec![
EmbedBuilder::new()
.set_title("The Embed Title")
.set_color_hex("#ff0000") // Red
.set_description("Hello world!")
.set_fields(vec![
EmbedFieldBuilder::new()
.set_name("Field Name")
.set_value("Field Value")
.build()
]
)
.build()
]
)
.build()
)
.build();
let url = "YOUR_WEBHOOK";
req.execute_url(url);
Structs§
- Allowed
Mention - The allowed mention object allows for more granular control over mentions without various hacks to the message content
- Allowed
Mention Builder - Builder for AllowedMentions
- Embed
- An Embed
- Embed
Author - Embed Author
- Embed
Author Builder - Builder for EmbedAuthor
- Embed
Builder - Builder for Embed
- Embed
Field - Embed Field
- Embed
Field Builder - Builder for EmbedField
- Embed
Footer - The footer of an Embed
- Embed
Footer Builder - Builder for EmbedFooter
- Embed
Image - Embed image
- Embed
Image Builder - Builder for EmbedImage
- Embed
Provider - Embed provider
- Embed
Provider Builder - Builder for EmbedProvider
- Embed
Thumbnail - Embed Thumbnail
- Embed
Thumbnail Builder - Builder for EmbedThumbnail
- Embed
Video - Embed Video
- Embed
Video Builder - Builder for EmbedVideo
- Webhook
- A webhook
- Webhook
Builder - Builder for Webhook
- Webhook
Request - A webhook request
- Webhook
Request Builder - Builder for WebhookRequest
Enums§
- Allowed
Mention Type - The type of Allowed Mentions