aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/11_create_message_builder/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/11_create_message_builder/src/main.rs b/examples/11_create_message_builder/src/main.rs
index 88be5a9..ff6a220 100644
--- a/examples/11_create_message_builder/src/main.rs
+++ b/examples/11_create_message_builder/src/main.rs
@@ -13,12 +13,17 @@ impl EventHandler for Handler {
// The create message builder allows you to easily create embeds and messages
// using a builder syntax.
// This example will create a message that says "Hello, World!", with an embed that has
- // a title, description, and footer.
+ // a title, description, three fields, and footer.
if let Err(why) = msg.channel_id.send_message(|m| m
.content("Hello, World!")
.embed(|e| e
.title("This is a title")
.description("This is a description")
+ .fields(vec![
+ ("This is the first field", "This is a field body", true),
+ ("This is the second field", "Both of these fields are inline", true),
+ ])
+ .field("This is the third field", "This is not an inline field", false)
.footer(|f| f
.text("This is a footer")))) {
println!("Error sending message: {:?}", why);