aboutsummaryrefslogtreecommitdiff
path: root/bin/bot.ml
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-01-20 23:19:35 -0700
committerAdelyn Breedlove <[email protected]>2019-01-20 23:19:35 -0700
commit9be6b59da80a04d5ea82da5b7d69b15ac1872673 (patch)
tree7855f10f6e4d5f968104cccb30b9f191568538bb /bin/bot.ml
parentimprove embed example (diff)
downloaddisml-9be6b59da80a04d5ea82da5b7d69b15ac1872673.tar.xz
disml-9be6b59da80a04d5ea82da5b7d69b15ac1872673.zip
Improve embed builders
Diffstat (limited to 'bin/bot.ml')
-rw-r--r--bin/bot.ml20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index bc7a1b7..37c7dc8 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -37,16 +37,16 @@ let check_command (msg:Message.t) =
|> url "https://gitlab.com/Mishio595/disml"
|> timestamp Time.(now () |> to_string_iso8601_basic ~zone:Time.Zone.utc)
|> colour 0xff
- |> footer { Embed.default_footer with text = "boop" }
- |> image { Embed.default_image with url = Some image_url }
- |> thumbnail { Embed.default_image with url = Some image_url }
- |> author { Embed.default_author with
- name = Some "Adelyn";
- url = Some "https://gitlab.com/Mishio595/disml";
- icon_url = Some image_url }
- |> field { name = "field 1"; value = "test"; inline = true; }
- |> field { name = "field 2"; value = "test"; inline = true; }
- |> field { name = "field 3"; value = "test"; inline = true; }
+ |> footer (fun f -> footer_text "boop" f)
+ |> image image_url
+ |> thumbnail image_url
+ |> author (fun a -> a
+ |> author_name "Adelyn"
+ |> author_icon image_url
+ |> author_url "https://gitlab.com/Mishio595/disml")
+ |> field ("field 1", "test", true)
+ |> field ("field 2", "test", true)
+ |> field ("field 3", "test", true)
) in
Message.reply_with ~embed msg >>> ignore
| _ -> ()