| Crates.io | discord-message |
| lib.rs | discord-message |
| version | 0.1.0 |
| created_at | 2021-07-22 16:02:04.306091+00 |
| updated_at | 2021-07-22 16:02:04.306091+00 |
| description | A crate containing the utilities needed to build Discord webhook messages from Rust |
| homepage | https://github.com/ewpratten/discord-lambda/discord-message |
| repository | https://github.com/ewpratten/discord-lambda |
| max_upload_size | |
| id | 425950 |
| size | 5,823 |
discord-message is a crate containing the utilities needed to build Discord webhook messages from Rust
fn main() {
let message = DiscordMessage {
username: Some("BotMan".to_string()),
content: "Text message. Up to 2000 characters.".to_string(),
embeds: vec![
Embed {
title: "Title".to_string(),
description: "Text message. You can use Markdown here.".to_string(),
..Default::default()
}
],
..Default::default()
};
let json = message.to_json().unwrap();
}